/data/school/front/protected/modules/show/models/Content.php(23)
11 * Returns the static model of the specified AR class. 12 * @param string $className active record class name. 13 * @return Content the static model class 14 */ 15 public static function model($className=__Class__){ 16 return parent::model($className); 17 } 18 19 /** 20 * @return string the associated database table name 21 */ 22 public function tableName(){ 23 return Yii::app()->dbc->tablePrefix.'content'; 24 } 25 26 /** 27 * insert 28 * 插入数据 29 * @param mixed $data 30 * @return void 31 */ 32 public function add($data) 33 { 34 $command = parent::$dbc->createCommand(); 35 try {
#0 |
+
–
/data/school/framework/db/CDbConnection.php(331): CDbConnection->open() 326 public function setActive($value) 327 { 328 if($value!=$this->_active) 329 { 330 if($value) 331 $this->open(); 332 else 333 $this->close(); 334 } 335 } 336 |
#1 |
+
–
/data/school/framework/db/CDbConnection.php(309): CDbConnection->setActive(true) 304 */ 305 public function init() 306 { 307 parent::init(); 308 if($this->autoConnect) 309 $this->setActive(true); 310 } 311 312 /** 313 * Returns whether the DB connection is established. 314 * @return boolean whether the DB connection is established |
#2 |
+
–
/data/school/framework/base/CModule.php(388): CDbConnection->init() 383 if(!isset($config['enabled']) || $config['enabled']) 384 { 385 Yii::trace("Loading \"$id\" application component",'system.CModule'); 386 unset($config['enabled']); 387 $component=Yii::createComponent($config); 388 $component->init(); 389 return $this->_components[$id]=$component; 390 } 391 } 392 } 393 |
#3 |
+
–
/data/school/framework/base/CModule.php(104): CModule->getComponent("dbc") 099 * @return mixed the named property value 100 */ 101 public function __get($name) 102 { 103 if($this->hasComponent($name)) 104 return $this->getComponent($name); 105 else 106 return parent::__get($name); 107 } 108 109 /** |
#4 |
+
–
/data/school/front/protected/modules/show/models/Content.php(23): CModule->__get("dbc") 18 19 /** 20 * @return string the associated database table name 21 */ 22 public function tableName(){ 23 return Yii::app()->dbc->tablePrefix.'content'; 24 } 25 26 /** 27 * insert 28 * 插入数据 |
#5 |
+
–
/data/school/framework/db/ar/CActiveRecord.php(2262): Content->tableName() 2257 */ 2258 public function __construct($model) 2259 { 2260 $this->_model=$model; 2261 2262 $tableName=$model->tableName(); 2263 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2264 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2265 array('{class}'=>get_class($model),'{table}'=>$tableName))); 2266 if($table->primaryKey===null) 2267 { |
#6 |
+
–
/data/school/framework/db/ar/CActiveRecord.php(379): CActiveRecordMetaData->__construct(Content) 374 if(isset(self::$_models[$className])) 375 return self::$_models[$className]; 376 else 377 { 378 $model=self::$_models[$className]=new $className(null); 379 $model->_md=new CActiveRecordMetaData($model); 380 $model->attachBehaviors($model->behaviors()); 381 return $model; 382 } 383 } 384 |
#7 |
+
–
/data/school/front/protected/modules/show/models/Content.php(16): CActiveRecord::model("Content") 11 * Returns the static model of the specified AR class. 12 * @param string $className active record class name. 13 * @return Content the static model class 14 */ 15 public static function model($className=__Class__){ 16 return parent::model($className); 17 } 18 19 /** 20 * @return string the associated database table name 21 */ |
#8 |
+
–
/data/school/front/protected/modules/index/controllers/DefaultController.php(49): Content::model() 44 //暂时显示所有城市 45 $list['citys'] = $cats = Cat::model()->getCitysList($citylist,'all'); 46 //默认显示北京 47 //$list['schools'] =Content::model()->getSchoolsList('北京'); 48 //默认显示所有成城市排序 49 $list['city_schools'] = Content::model()->sortSchool($cats); 50 51 //标题,关键字,描述 52 $this->title = '列表'; 53 $this->keywords = ''; 54 $this->descption = ''; |
#9 |
+
–
/data/school/framework/web/actions/CInlineAction.php(50): DefaultController->actionList() 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 } |
#10 |
+
–
/data/school/framework/web/CController.php(309): CInlineAction->runWithParams(array()) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#11 |
+
–
/data/school/framework/web/CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#12 |
+
–
/data/school/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#13 |
+
–
/data/school/framework/web/CWebApplication.php(276): CController->run("list") 271 { 272 list($controller,$actionID)=$ca; 273 $oldController=$this->_controller; 274 $this->_controller=$controller; 275 $controller->init(); 276 $controller->run($actionID); 277 $this->_controller=$oldController; 278 } 279 else 280 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 281 array('{route}'=>$route===''?$this->defaultController:$route))); |
#14 |
+
–
/data/school/framework/web/CWebApplication.php(135): CWebApplication->runController("index/default/list") 130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 131 $_GET[$name]=$value; 132 } 133 else 134 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 135 $this->runController($route); 136 } 137 138 /** 139 * Registers the core application components. 140 * This method overrides the parent implementation by registering additional core components. |
#15 |
+
–
/data/school/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#16 |
+
–
/data/school/front/index.php(46): CApplication->run() 41 42 require_once($yii); 43 44 require_once($globals); 45 46 Yii::createWebApplication($config)->run(); |