/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(2390)
2378 2379 /** 2380 * Constructor. 2381 * @param CActiveRecord $model the model instance 2382 * @throws CDbException if specified table for active record class cannot be found in the database 2383 */ 2384 public function __construct($model) 2385 { 2386 $this->_modelClassName=get_class($model); 2387 2388 $tableName=$model->tableName(); 2389 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2390 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2391 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2392 2393 if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null) 2394 { 2395 $table->primaryKey=$modelPk; 2396 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey])) 2397 $table->columns[$table->primaryKey]->isPrimaryKey=true; 2398 elseif(is_array($table->primaryKey)) 2399 { 2400 foreach($table->primaryKey as $name) 2401 { 2402 if(isset($table->columns[$name]))
#0 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct(Users) 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 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/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 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1493): CActiveRecord->getTableSchema() 1488 */ 1489 public function findByPk($pk,$condition='',$params=array()) 1490 { 1491 Yii::trace(get_class($this).'.findByPk()','system.db.ar.CActiveRecord'); 1492 $prefix=$this->getTableAlias(true).'.'; 1493 $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params,$prefix); 1494 return $this->query($criteria); 1495 } 1496 1497 /** 1498 * Finds all active records with the specified primary keys. |
#3 |
+
–
/home/u170662/sparkkingru/www/protected/components/BaseController.php(15): CActiveRecord->findByPk(null) 10 parent::init(); 11 12 $session = new CHttpSession; 13 $session->open(); 14 15 $User = Users::model()->findByPk(Yii::app()->user->id); 16 if ($User === null) { 17 if (!isset($session['userHash']) || $session['userHash'] === "") { 18 $session['userHash'] = md5(time() . mt_rand(1, 999)); 19 } 20 } |
#4 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/web/CWebApplication.php(281): BaseController->init() 276 if(($ca=$this->createController($route))!==null) 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}".', |
#5 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("articles/view") 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. |
#6 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/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 /** |
#7 |
+
–
/home/u170662/sparkkingru/www/protected/behaviors/WebApplicationEndBehavior.php(23): CApplication->run() 18 19 // обрабатываем событие создания модуля 20 $this->onModuleCreate = array($this, 'changeModulePaths'); 21 $this->onModuleCreate(new CEvent ($this->owner)); 22 23 $this->owner->run(); 24 } 25 26 // обработчик события onModuleCreate 27 public function onModuleCreate($event) 28 { |
#8 |
unknown(0): WebApplicationEndBehavior->runEnd("frontend")
|
#9 |
+
–
/home/u170662/sparkkingru/www/vendor/yiisoft/yii/framework/base/CComponent.php(261): call_user_func_array(array(WebApplicationEndBehavior, "runEnd"), array("frontend")) 256 if($this->_m!==null) 257 { 258 foreach($this->_m as $object) 259 { 260 if($object->getEnabled() && method_exists($object,$name)) 261 return call_user_func_array(array($object,$name),$parameters); 262 } 263 } 264 if(class_exists('Closure', false) && ($this->canGetProperty($name) || property_exists($this, $name)) && $this->$name instanceof Closure) 265 return call_user_func_array($this->$name, $parameters); 266 throw new CException(Yii::t('yii','{class} and its behaviors do not have a method or closure named "{name}".', |
#10 |
+
–
/home/u170662/sparkkingru/www/index.php(16): CComponent->__call("runEnd", array("frontend")) 11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 12 //test 13 require_once(dirname(__FILE__).'/vendor/autoload.php'); 14 require_once($yii); 15 16 Application::createWebApplication($config)->runEnd('frontend'); |
#11 |
+
–
/home/u170662/sparkkingru/www/index.php(16): CWebApplication->runEnd("frontend") 11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 12 //test 13 require_once(dirname(__FILE__).'/vendor/autoload.php'); 14 require_once($yii); 15 16 Application::createWebApplication($config)->runEnd('frontend'); |