/usr/share/php/framework/db/ar/CActiveRecord.php(2391)
2379 2380 /** 2381 * Constructor. 2382 * @param CActiveRecord $model the model instance 2383 * @throws CDbException if specified table for active record class cannot be found in the database 2384 */ 2385 public function __construct($model) 2386 { 2387 $this->_modelClassName=get_class($model); 2388 2389 $tableName=$model->tableName(); 2390 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2391 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2392 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2393 2394 if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null) 2395 { 2396 $table->primaryKey=$modelPk; 2397 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey])) 2398 $table->columns[$table->primaryKey]->isPrimaryKey=true; 2399 elseif(is_array($table->primaryKey)) 2400 { 2401 foreach($table->primaryKey as $name) 2402 { 2403 if(isset($table->columns[$name]))
#0 |
+
–
/usr/share/php/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct() 408 { 409 $className=get_class($this); 410 if(!array_key_exists($className,self::$_md)) 411 { 412 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 413 self::$_md[$className]=new CActiveRecordMetaData($this); 414 } 415 return self::$_md[$className]; 416 } 417 418 /** |
#1 |
+
–
/usr/share/php/framework/db/ar/CActiveRecord.php(663): CActiveRecord->getMetaData() 658 * Returns the metadata of the table that this AR belongs to 659 * @return CDbTableSchema the metadata of the table that this AR belongs to 660 */ 661 public function getTableSchema() 662 { 663 return $this->getMetaData()->tableSchema; 664 } 665 666 /** 667 * Returns the command builder used by this AR. 668 * @return CDbCommandBuilder the command builder used by this AR |
#2 |
+
–
/usr/share/php/framework/db/ar/CActiveRecord.php(1358): CActiveRecord->getTableSchema() 1353 1354 if(empty($criteria->with)) 1355 { 1356 if(!$all) 1357 $criteria->limit=1; 1358 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria); 1359 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 1360 } 1361 else 1362 { 1363 $finder=$this->getActiveFinder($criteria->with); |
#3 |
+
–
/usr/share/php/framework/db/ar/CActiveRecord.php(1464): CActiveRecord->query() 1459 */ 1460 public function find($condition='',$params=array()) 1461 { 1462 Yii::trace(get_class($this).'.find()','system.db.ar.CActiveRecord'); 1463 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 1464 return $this->query($criteria); 1465 } 1466 1467 /** 1468 * Finds all active records satisfying the specified condition. 1469 * See {@link find()} for detailed explanation about $condition and $params. |
#4 |
+
–
/home/atv/atvgroup.ru/protected/controllers/SiteController.php(123): CActiveRecord->find() 118 $this->layout = 'clear'; 119 120 121 122 123 $article = AllNews::model()->find("`id`=$id and `code`='pelec' "); 124 125 //$article = array_shift($articles); 126 //print_r($article); 127 //die(); 128 $string = $article->text; |
#5 |
unknown(0): SiteController->actionViewOtherNews()
|
#6 |
+
–
/usr/share/php/framework/web/actions/CAction.php(114): ReflectionMethod->invokeArgs() 109 elseif($param->isDefaultValueAvailable()) 110 $ps[]=$param->getDefaultValue(); 111 else 112 return false; 113 } 114 $method->invokeArgs($object,$ps); 115 return true; 116 } 117 } |
#7 |
+
–
/usr/share/php/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal() 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 |
+
–
/usr/share/php/framework/web/CController.php(308): CInlineAction->runWithParams() 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 |
+
–
/usr/share/php/framework/web/CController.php(286): CController->runAction() 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 |
+
–
/usr/share/php/framework/web/CController.php(265): CController->runActionWithFilters() 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 |
+
–
/usr/share/php/framework/web/CWebApplication.php(282): CController->run() 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 |
+
–
/usr/share/php/framework/web/CWebApplication.php(141): CWebApplication->runController() 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 |
+
–
/usr/share/php/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#14 |
+
–
/home/atv/atvgroup.ru/index.php(19): CApplication->run() 14 // specify how many levels of call stack should be shown in each log message 15 //defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 16 17 require_once($yii); 18 19 Yii::createWebApplication($config)->run(); 20 21 |