C:\AppServ\www\welfare\framework\db\CDbConnection.php(398)
386 throw new CDbException('CDbConnection.connectionString cannot be empty.'); 387 try 388 { 389 Yii::trace('Opening DB connection','system.db.CDbConnection'); 390 $this->_pdo=$this->createPdoInstance(); 391 $this->initConnection($this->_pdo); 392 $this->_active=true; 393 } 394 catch(PDOException $e) 395 { 396 if(YII_DEBUG) 397 { 398 throw new CDbException('CDbConnection failed to open the DB connection: '. 399 $e->getMessage(),(int)$e->getCode(),$e->errorInfo); 400 } 401 else 402 { 403 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 404 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo); 405 } 406 } 407 } 408 } 409 410 /**
#0 |
+
–
C:\AppServ\www\welfare\framework\db\CDbConnection.php(346): CDbConnection->open() 341 public function setActive($value) 342 { 343 if($value!=$this->_active) 344 { 345 if($value) 346 $this->open(); 347 else 348 $this->close(); 349 } 350 } 351 |
#1 |
+
–
C:\AppServ\www\welfare\framework\db\CDbConnection.php(324): CDbConnection->setActive(true) 319 */ 320 public function init() 321 { 322 parent::init(); 323 if($this->autoConnect) 324 $this->setActive(true); 325 } 326 327 /** 328 * Returns whether the DB connection is established. 329 * @return boolean whether the DB connection is established |
#2 |
+
–
C:\AppServ\www\welfare\framework\base\CModule.php(387): CDbConnection->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#3 |
+
–
C:\AppServ\www\welfare\framework\base\CApplication.php(458): CModule->getComponent("db") 453 * Returns the database connection component. 454 * @return CDbConnection the database connection 455 */ 456 public function getDb() 457 { 458 return $this->getComponent('db'); 459 } 460 461 /** 462 * Returns the error handler component. 463 * @return CErrorHandler the error handler application component. |
#4 |
+
–
C:\AppServ\www\welfare\framework\db\ar\CActiveRecord.php(637): CApplication->getDb() 632 { 633 if(self::$db!==null) 634 return self::$db; 635 else 636 { 637 self::$db=Yii::app()->getDb(); 638 if(self::$db instanceof CDbConnection) 639 return self::$db; 640 else 641 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 642 } |
#5 |
+
–
C:\AppServ\www\welfare\framework\db\ar\CActiveRecord.php(670): CActiveRecord->getDbConnection() 665 * Returns the command builder used by this AR. 666 * @return CDbCommandBuilder the command builder used by this AR 667 */ 668 public function getCommandBuilder() 669 { 670 return $this->getDbConnection()->getSchema()->getCommandBuilder(); 671 } 672 673 /** 674 * Checks whether this AR has the named attribute 675 * @param string $name attribute name |
#6 |
+
–
C:\AppServ\www\welfare\framework\db\ar\CActiveRecord.php(1599): CActiveRecord->getCommandBuilder() 1594 */ 1595 public function count($condition='',$params=array()) 1596 { 1597 Yii::trace(get_class($this).'.count()','system.db.ar.CActiveRecord'); 1598 $this->beforeCount(); 1599 $builder=$this->getCommandBuilder(); 1600 $criteria=$builder->createCriteria($condition,$params); 1601 $this->applyScopes($criteria); 1602 1603 if(empty($criteria->with)) 1604 return $builder->createCountCommand($this->getTableSchema(),$criteria)->queryScalar(); |
#7 |
+
–
C:\AppServ\www\welfare\framework\web\CActiveDataProvider.php(228): CActiveRecord->count(CDbCriteria) 223 protected function calculateTotalItemCount() 224 { 225 $baseCriteria=$this->model->getDbCriteria(false); 226 if($baseCriteria!==null) 227 $baseCriteria=clone $baseCriteria; 228 $count=$this->model->count($this->getCountCriteria()); 229 $this->model->setDbCriteria($baseCriteria); 230 return $count; 231 } 232 } |
#8 |
+
–
C:\AppServ\www\welfare\framework\web\CDataProvider.php(224): CActiveDataProvider->calculateTotalItemCount() 219 * @return integer total number of possible data items. 220 */ 221 public function getTotalItemCount($refresh=false) 222 { 223 if($this->_totalItemCount===null || $refresh) 224 $this->_totalItemCount=$this->calculateTotalItemCount(); 225 return $this->_totalItemCount; 226 } 227 228 /** 229 * Sets the total number of data items. |
#9 |
+
–
C:\AppServ\www\welfare\framework\web\CActiveDataProvider.php(178): CDataProvider->getTotalItemCount() 173 { 174 $criteria=clone $this->getCriteria(); 175 176 if(($pagination=$this->getPagination())!==false) 177 { 178 $pagination->setItemCount($this->getTotalItemCount()); 179 $pagination->applyLimit($criteria); 180 } 181 182 $baseCriteria=$this->model->getDbCriteria(false); 183 |
#10 |
+
–
C:\AppServ\www\welfare\framework\web\CDataProvider.php(168): CActiveDataProvider->fetchData() 163 * @return array the list of data items currently available in this data provider. 164 */ 165 public function getData($refresh=false) 166 { 167 if($this->_data===null || $refresh) 168 $this->_data=$this->fetchData(); 169 return $this->_data; 170 } 171 172 /** 173 * Sets the data items for this provider. |
#11 |
+
–
C:\AppServ\www\welfare\framework\zii\widgets\CBaseListView.php(125): CDataProvider->getData() 120 public function init() 121 { 122 if($this->dataProvider===null) 123 throw new CException(Yii::t('zii','The "dataProvider" property cannot be empty.')); 124 125 $this->dataProvider->getData(); 126 127 if(isset($this->htmlOptions['id'])) 128 $this->id=$this->htmlOptions['id']; 129 else 130 $this->htmlOptions['id']=$this->id; |
#12 |
+
–
C:\AppServ\www\welfare\framework\zii\widgets\grid\CGridView.php(339): CBaseListView->init() 334 * Initializes the grid view. 335 * This method will initialize required property values and instantiate {@link columns} objects. 336 */ 337 public function init() 338 { 339 parent::init(); 340 341 if(empty($this->updateSelector)) 342 throw new CException(Yii::t('zii','The property updateSelector should be defined.')); 343 if(empty($this->filterSelector)) 344 throw new CException(Yii::t('zii','The property filterSelector should be defined.')); |
#13 |
+
–
C:\AppServ\www\welfare\protected\extensions\bootstrap\widgets\TbGridView.php(68): CGridView->init() 63 * 64 * Initializes the widget. 65 */ 66 public function init() 67 { 68 parent::init(); 69 70 $classes = array('table'); 71 if (isset($this->type)) { 72 if (is_string($this->type)) { 73 $this->type = explode(' ', $this->type); |
#14 |
+
–
C:\AppServ\www\welfare\framework\web\CBaseController.php(147): TbGridView->init() 142 * @return CWidget the fully initialized widget instance. 143 */ 144 public function createWidget($className,$properties=array()) 145 { 146 $widget=Yii::app()->getWidgetFactory()->createWidget($this,$className,$properties); 147 $widget->init(); 148 return $widget; 149 } 150 151 /** 152 * Creates a widget and executes it. |
#15 |
+
–
C:\AppServ\www\welfare\framework\web\CBaseController.php(180): CBaseController->createWidget("bootstrap.widgets.TbGridView", array("id" => "book-booking-grid", "dataProvider" => CActiveDataProvider, "type" => "striped bordered condensed hover", "enablePagination" => true, ...)) 175 } 176 return ob_get_clean(); 177 } 178 else 179 { 180 $widget=$this->createWidget($className,$properties); 181 $widget->run(); 182 return $widget; 183 } 184 } 185 |
#16 |
+
–
C:\AppServ\www\welfare\protected\views\site\index.php(41): CBaseController->widget("bootstrap.widgets.TbGridView", array("id" => "book-booking-grid", "dataProvider" => CActiveDataProvider, "type" => "striped bordered condensed hover", "enablePagination" => true, ...)) 36 37 ), 38 'document_load', 39 'profile.firstname' 40 ), 41 )); 42 ?> |
#17 |
+
–
C:\AppServ\www\welfare\framework\web\CBaseController.php(126): require("C:\AppServ\www\welfare\protected\views\site\index.php") 121 $data=$_data_; 122 if($_return_) 123 { 124 ob_start(); 125 ob_implicit_flush(false); 126 require($_viewFile_); 127 return ob_get_clean(); 128 } 129 else 130 require($_viewFile_); 131 } |
#18 |
+
–
C:\AppServ\www\welfare\framework\web\CBaseController.php(95): CBaseController->renderInternal("C:\AppServ\www\welfare\protected\views\site\index.php", array("dataProvider" => CActiveDataProvider), true) 090 { 091 $widgetCount=count($this->_widgetStack); 092 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 093 $content=$renderer->renderFile($this,$viewFile,$data,$return); 094 else 095 $content=$this->renderInternal($viewFile,$data,$return); 096 if(count($this->_widgetStack)===$widgetCount) 097 return $content; 098 else 099 { 100 $widget=end($this->_widgetStack); |
#19 |
+
–
C:\AppServ\www\welfare\framework\web\CController.php(869): CBaseController->renderFile("C:\AppServ\www\welfare\protected\views\site\index.php", array("dataProvider" => CActiveDataProvider), true) 864 */ 865 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 866 { 867 if(($viewFile=$this->getViewFile($view))!==false) 868 { 869 $output=$this->renderFile($viewFile,$data,true); 870 if($processOutput) 871 $output=$this->processOutput($output); 872 if($return) 873 return $output; 874 else |
#20 |
+
–
C:\AppServ\www\welfare\framework\web\CController.php(782): CController->renderPartial("index", array("dataProvider" => CActiveDataProvider), true) 777 */ 778 public function render($view,$data=null,$return=false) 779 { 780 if($this->beforeRender($view)) 781 { 782 $output=$this->renderPartial($view,$data,true); 783 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 784 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 785 786 $this->afterRender($view,$output); 787 |
#21 |
+
–
C:\AppServ\www\welfare\protected\controllers\SiteController.php(33): CController->render("index", array("dataProvider" => CActiveDataProvider)) 28 $dataProvider = new CActiveDataProvider('DocDocument', array( 29 'sort' => array( 30 'defaultOrder' => 'id DESC', 31 ), 32 )); 33 $this->render('index', array('dataProvider' => $dataProvider)); 34 } 35 36 /** 37 * This is the action to handle external exceptions. 38 */ |
#22 |
+
–
C:\AppServ\www\welfare\framework\web\actions\CInlineAction.php(49): SiteController->actionIndex() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 else 49 return $controller->$methodName(); 50 } 51 52 } |
#23 |
+
–
C:\AppServ\www\welfare\framework\web\CController.php(308): CInlineAction->runWithParams(array()) 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; |
#24 |
+
–
C:\AppServ\www\welfare\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(); |
#25 |
+
–
C:\AppServ\www\welfare\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); |
#26 |
+
–
C:\AppServ\www\welfare\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))); |
#27 |
+
–
C:\AppServ\www\welfare\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. |
#28 |
+
–
C:\AppServ\www\welfare\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 /** |
#29 |
+
–
C:\AppServ\www\welfare\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(); |