/home/vashtur/vashtur.ru/docs/framework/db/CDbConnection.php(348)
336 throw new CDbException(Yii::t('yii','CDbConnection.connectionString cannot be empty.')); 337 try 338 { 339 Yii::trace('Opening DB connection','system.db.CDbConnection'); 340 $this->_pdo=$this->createPdoInstance(); 341 $this->initConnection($this->_pdo); 342 $this->_active=true; 343 } 344 catch(PDOException $e) 345 { 346 if(YII_DEBUG) 347 { 348 throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection: {error}', 349 array('{error}'=>$e->getMessage())),(int)$e->getCode(),$e->errorInfo); 350 } 351 else 352 { 353 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 354 throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection.'),(int)$e->getCode(),$e->errorInfo); 355 } 356 } 357 } 358 } 359 360 /**
#0 |
+
–
/home/vashtur/vashtur.ru/docs/framework/db/CDbConnection.php(297): CDbConnection->open() 292 public function setActive($value) 293 { 294 if($value!=$this->_active) 295 { 296 if($value) 297 $this->open(); 298 else 299 $this->close(); 300 } 301 } 302 |
#1 |
+
–
/home/vashtur/vashtur.ru/docs/framework/db/CDbConnection.php(275): CDbConnection->setActive(true) 270 */ 271 public function init() 272 { 273 parent::init(); 274 if($this->autoConnect) 275 $this->setActive(true); 276 } 277 278 /** 279 * Returns whether the DB connection is established. 280 * @return boolean whether the DB connection is established |
#2 |
+
–
/home/vashtur/vashtur.ru/docs/framework/base/CModule.php(372): CDbConnection->init() 367 if(!isset($config['enabled']) || $config['enabled']) 368 { 369 Yii::trace("Loading \"$id\" application component",'system.CModule'); 370 unset($config['enabled']); 371 $component=Yii::createComponent($config); 372 $component->init(); 373 return $this->_components[$id]=$component; 374 } 375 } 376 } 377 |
#3 |
+
–
/home/vashtur/vashtur.ru/docs/framework/base/CApplication.php(426): CModule->getComponent("db") 421 * Returns the database connection component. 422 * @return CDbConnection the database connection 423 */ 424 public function getDb() 425 { 426 return $this->getComponent('db'); 427 } 428 429 /** 430 * Returns the error handler component. 431 * @return CErrorHandler the error handler application component. |
#4 |
+
–
/home/vashtur/vashtur.ru/docs/framework/db/ar/CActiveRecord.php(607): CApplication->getDb() 602 { 603 if(self::$db!==null) 604 return self::$db; 605 else 606 { 607 self::$db=Yii::app()->getDb(); 608 if(self::$db instanceof CDbConnection) 609 return self::$db; 610 else 611 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 612 } |
#5 |
+
–
/home/vashtur/vashtur.ru/docs/framework/db/ar/CActiveRecord.php(2236): CActiveRecord->getDbConnection() 2231 public function __construct($model) 2232 { 2233 $this->_model=$model; 2234 2235 $tableName=$model->tableName(); 2236 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2237 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2238 array('{class}'=>get_class($model),'{table}'=>$tableName))); 2239 if($table->primaryKey===null) 2240 $table->primaryKey=$model->primaryKey(); 2241 $this->tableSchema=$table; |
#6 |
+
–
/home/vashtur/vashtur.ru/docs/framework/db/ar/CActiveRecord.php(371): CActiveRecordMetaData->__construct(Page) 366 if(isset(self::$_models[$className])) 367 return self::$_models[$className]; 368 else 369 { 370 $model=self::$_models[$className]=new $className(null); 371 $model->_md=new CActiveRecordMetaData($model); 372 $model->attachBehaviors($model->behaviors()); 373 return $model; 374 } 375 } 376 |
#7 |
+
–
/home/vashtur/vashtur.ru/docs/protected/models/Page.php(23): CActiveRecord::model("Page") 18 * Returns the static model of the specified AR class. 19 * @return Page the static model class 20 */ 21 public static function model($className=__CLASS__) 22 { 23 return parent::model($className); 24 } 25 26 /** 27 * @return string the associated database table name 28 */ |
#8 |
+
–
/home/vashtur/vashtur.ru/docs/protected/controllers/CountryController.php(6): Page::model() 01 <?php 02 class CountryController extends Controller 03 { 04 public function actionView($id) 05 { 06 $page = Page::model()->findByPk("countries"); 07 $model = $this->loadModel($id); 08 $this->render('view',array("model"=>$model,"page"=>$page)); 09 } 10 11 public function actionIndex() |
#9 |
unknown(0): CountryController->actionView("jamaica")
|
#10 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/actions/CAction.php(104): ReflectionMethod->invokeArgs(CountryController, array("jamaica")) 099 else if($param->isDefaultValueAvailable()) 100 $ps[]=$param->getDefaultValue(); 101 else 102 return false; 103 } 104 $method->invokeArgs($object,$ps); 105 return true; 106 } 107 } |
#11 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/actions/CInlineAction.php(48): CAction->runWithParamsInternal(CountryController, ReflectionMethod, array("id" => "jamaica")) 43 { 44 $methodName='action'.$this->getId(); 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#12 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/CController.php(300): CInlineAction->runWithParams(array("id" => "jamaica")) 295 { 296 $priorAction=$this->_action; 297 $this->_action=$action; 298 if($this->beforeAction($action)) 299 { 300 if($action->runWithParams($this->getActionParams())===false) 301 $this->invalidActionParams($action); 302 else 303 $this->afterAction($action); 304 } 305 $this->_action=$priorAction; |
#13 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/CController.php(278): CController->runAction(CInlineAction) 273 * @see runAction 274 */ 275 public function runActionWithFilters($action,$filters) 276 { 277 if(empty($filters)) 278 $this->runAction($action); 279 else 280 { 281 $priorAction=$this->_action; 282 $this->_action=$action; 283 CFilterChain::create($this,$action,$filters)->run(); |
#14 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array()) 252 { 253 if(($parent=$this->getModule())===null) 254 $parent=Yii::app(); 255 if($parent->beforeControllerAction($this,$action)) 256 { 257 $this->runActionWithFilters($action,$this->filters()); 258 $parent->afterControllerAction($this,$action); 259 } 260 } 261 else 262 $this->missingAction($actionID); |
#15 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/CWebApplication.php(328): CController->run("view") 323 { 324 list($controller,$actionID)=$ca; 325 $oldController=$this->_controller; 326 $this->_controller=$controller; 327 $controller->init(); 328 $controller->run($actionID); 329 $this->_controller=$oldController; 330 } 331 else 332 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 333 array('{route}'=>$route===''?$this->defaultController:$route))); |
#16 |
+
–
/home/vashtur/vashtur.ru/docs/framework/web/CWebApplication.php(121): CWebApplication->runController("country/view") 116 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 117 $_GET[$name]=$value; 118 } 119 else 120 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 121 $this->runController($route); 122 } 123 124 /** 125 * Registers the core application components. 126 * This method overrides the parent implementation by registering additional core components. |
#17 |
+
–
/home/vashtur/vashtur.ru/docs/framework/base/CApplication.php(155): CWebApplication->processRequest() 150 */ 151 public function run() 152 { 153 if($this->hasEventHandler('onBeginRequest')) 154 $this->onBeginRequest(new CEvent($this)); 155 $this->processRequest(); 156 if($this->hasEventHandler('onEndRequest')) 157 $this->onEndRequest(new CEvent($this)); 158 } 159 160 /** |
#18 |
+
–
/home/vashtur/vashtur.ru/docs/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(); |