/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(2385)
2373 2374 /** 2375 * Constructor. 2376 * @param CActiveRecord $model the model instance 2377 * @throws CDbException if specified table for active record class cannot be found in the database 2378 */ 2379 public function __construct($model) 2380 { 2381 $this->_modelClassName=get_class($model); 2382 2383 $tableName=$model->tableName(); 2384 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2385 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2386 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2387 2388 if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null) 2389 { 2390 $table->primaryKey=$modelPk; 2391 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey])) 2392 $table->columns[$table->primaryKey]->isPrimaryKey=true; 2393 elseif(is_array($table->primaryKey)) 2394 { 2395 foreach($table->primaryKey as $name) 2396 { 2397 if(isset($table->columns[$name]))
#0 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct(TravelHotels) 406 { 407 $className=get_class($this); 408 if(!array_key_exists($className,self::$_md)) 409 { 410 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 411 self::$_md[$className]=new CActiveRecordMetaData($this); 412 } 413 return self::$_md[$className]; 414 } 415 416 /** |
#1 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(661): CActiveRecord->getMetaData() 656 * Returns the metadata of the table that this AR belongs to 657 * @return CDbTableSchema the metadata of the table that this AR belongs to 658 */ 659 public function getTableSchema() 660 { 661 return $this->getMetaData()->tableSchema; 662 } 663 664 /** 665 * Returns the command builder used by this AR. 666 * @return CDbCommandBuilder the command builder used by this AR |
#2 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(1355): CActiveRecord->getTableSchema() 1350 1351 if(empty($criteria->with)) 1352 { 1353 if(!$all) 1354 $criteria->limit=1; 1355 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria); 1356 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 1357 } 1358 else 1359 { 1360 $finder=$this->getActiveFinder($criteria->with); |
#3 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(1461): CActiveRecord->query(CDbCriteria) 1456 */ 1457 public function find($condition='',$params=array()) 1458 { 1459 Yii::trace(get_class($this).'.find()','system.db.ar.CActiveRecord'); 1460 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 1461 return $this->query($criteria); 1462 } 1463 1464 /** 1465 * Finds all active records satisfying the specified condition. 1466 * See {@link find()} for detailed explanation about $condition and $params. |
#4 |
+
–
/home/admin/domains/phuket108.com/public_html/protected/controllers/HotelController.php(175): CActiveRecord->find("slug = :slug", array(":slug" => "maikhao-palm-beach-resort-sha-plus")) 170 171 // } 172 173 public function actionDetail($slug = NULL) { 174 175 $hotel = TravelHotels::model()->find('slug = :slug', array(':slug' => $slug)); 176 177 // echo $hotel->hotel_name; 178 179 // echo $slug; 180 |
#5 |
unknown(0): HotelController->actionDetail("maikhao-palm-beach-resort-sha-plus")
|
#6 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(HotelController, array("maikhao-palm-beach-resort-sha-plus")) 104 elseif($param->isDefaultValueAvailable()) 105 $ps[]=$param->getDefaultValue(); 106 else 107 return false; 108 } 109 $method->invokeArgs($object,$ps); 110 return true; 111 } 112 } |
#7 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(HotelController, ReflectionMethod, array("page" => "hotel/maikhao-palm-beach-resort-sha-plus", "slug" => "maikhao-palm-beach-resort-sha-plus")) 42 { 43 $methodName='action'.$this->getId(); 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
#8 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/CController.php(308): CInlineAction->runWithParams(array("page" => "hotel/maikhao-palm-beach-resort-sha-plus", "slug" => "maikhao-palm-beach-resort-sha-plus")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#9 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#10 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#11 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/CWebApplication.php(282): CController->run("detail") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#12 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/web/CWebApplication.php(141): CWebApplication->runController("hotel/detail") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#13 |
+
–
/home/admin/domains/phuket108.com/public_html/yii-framework/framework/base/CApplication.php(184): CWebApplication->processRequest() 179 public function run() 180 { 181 if($this->hasEventHandler('onBeginRequest')) 182 $this->onBeginRequest(new CEvent($this)); 183 register_shutdown_function(array($this,'end'),0,false); 184 $this->processRequest(); 185 if($this->hasEventHandler('onEndRequest')) 186 $this->onEndRequest(new CEvent($this)); 187 } 188 189 /** |
#14 |
+
–
/home/admin/domains/phuket108.com/public_html/index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run(); |