/home/site/wwwroot/yiiMain/framework/db/ar/CActiveRecord.php(2312)
2300 private $_model; 2301 2302 /** 2303 * Constructor. 2304 * @param CActiveRecord $model the model instance 2305 */ 2306 public function __construct($model) 2307 { 2308 $this->_model=$model; 2309 2310 $tableName=$model->tableName(); 2311 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2312 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2313 array('{class}'=>get_class($model),'{table}'=>$tableName))); 2314 if($table->primaryKey===null) 2315 { 2316 $table->primaryKey=$model->primaryKey(); 2317 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey])) 2318 $table->columns[$table->primaryKey]->isPrimaryKey=true; 2319 else if(is_array($table->primaryKey)) 2320 { 2321 foreach($table->primaryKey as $name) 2322 { 2323 if(isset($table->columns[$name])) 2324 $table->columns[$name]->isPrimaryKey=true;
#0 |
+
–
/home/site/wwwroot/yiiMain/framework/db/ar/CActiveRecord.php(388): CActiveRecordMetaData->__construct(Download) 383 if(isset(self::$_models[$className])) 384 return self::$_models[$className]; 385 else 386 { 387 $model=self::$_models[$className]=new $className(null); 388 $model->_md=new CActiveRecordMetaData($model); 389 $model->attachBehaviors($model->behaviors()); 390 return $model; 391 } 392 } 393 |
#1 |
+
–
/home/site/wwwroot/protected/models/Download.php(22): CActiveRecord::model("Download") 17 * @param string $className active record class name. 18 * @return Download the static model class 19 */ 20 public static function model($className=__CLASS__) 21 { 22 return parent::model($className); 23 } 24 25 /** 26 * @return string the associated database table name 27 */ |
#2 |
+
–
/home/site/wwwroot/protected/controllers/SiteController.php(394): Download::model() 389 } 390 // downlaods 391 public function actionDownload_index() 392 { 393 $this->layout='main2'; 394 $down = Download::model()->findAll(); 395 //$downid = Download::model()->findByPk(); 396 $down_cat = DownloadCategory::model()->findAllBySql('SELECT DISTINCT d.Title,d.Download_ID,dd.ID FROM download_category d INNER JOIN download dd ON d.Download_ID=dd.ID '); 397 $this->render('downloads_index',array('down'=>$down,'down_cat'=>$down_cat)); 398 } 399 public function actionDownloads($type) |
#3 |
+
–
/home/site/wwwroot/yiiMain/framework/web/actions/CInlineAction.php(50): SiteController->actionDownload_index() 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 } |
#4 |
+
–
/home/site/wwwroot/yiiMain/framework/web/CController.php(309): CInlineAction->runWithParams(array("r" => "site/download_index")) 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; |
#5 |
+
–
/home/site/wwwroot/yiiMain/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(); |
#6 |
+
–
/home/site/wwwroot/yiiMain/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); |
#7 |
+
–
/home/site/wwwroot/yiiMain/framework/web/CWebApplication.php(283): CController->run("download_index") 278 { 279 list($controller,$actionID)=$ca; 280 $oldController=$this->_controller; 281 $this->_controller=$controller; 282 $controller->init(); 283 $controller->run($actionID); 284 $this->_controller=$oldController; 285 } 286 else 287 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 288 array('{route}'=>$route===''?$this->defaultController:$route))); |
#8 |
+
–
/home/site/wwwroot/yiiMain/framework/web/CWebApplication.php(142): CWebApplication->runController("site/download_index") 137 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 138 $_GET[$name]=$value; 139 } 140 else 141 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 142 $this->runController($route); 143 } 144 145 /** 146 * Registers the core application components. 147 * This method overrides the parent implementation by registering additional core components. |
#9 |
+
–
/home/site/wwwroot/yiiMain/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 /** |
#10 |
+
–
/home/site/wwwroot/index.php(14): CApplication->run() 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 14 Yii::createWebApplication($config)->run(); 15 16 17 ?> |