/home/ahjktwet/domains/inli.ir/public_html/portal/protected/components/StartupBehavior.php(17)
05 { 06 // set the event callback 07 $owner->attachEventHandler('onBeginRequest', array($this, 'beginRequest')); 08 } 09 10 /** 11 * This method is attached to the 'onBeginRequest' event above. 12 **/ 13 public function beginRequest(CEvent $event) 14 { 15 $urlManager = Yii::app()->getUrlManager(); 16 $sql='select * from {{article}} where status="1"'; 17 $result=Yii::app()->db->createCommand($sql)->queryAll(); 18 19 //echo '<pre>';print_r($result);die; 20 if($result) { 21 $rules = array(); 22 foreach($result as $row) 23 { 24 $alias= $row['alias']; 25 if(!empty($alias)) 26 { 27 $alias=str_replace(' ','-',$alias); 28 $rules[$alias]='article/article/view/id/'.$row['article_id']; 29
| #0 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/db/CDbConnection.php(347): CDbConnection->open() 342 public function setActive($value) 343 { 344 if($value!=$this->_active) 345 { 346 if($value) 347 $this->open(); 348 else 349 $this->close(); 350 } 351 } 352 |
| #1 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/db/CDbConnection.php(325): CDbConnection->setActive(true) 320 */ 321 public function init() 322 { 323 parent::init(); 324 if($this->autoConnect) 325 $this->setActive(true); 326 } 327 328 /** 329 * Returns whether the DB connection is established. 330 * @return boolean whether the DB connection is established |
| #2 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/base/CModule.php(394): CDbConnection->init() 389 if(!isset($config['enabled']) || $config['enabled']) 390 { 391 Yii::trace("Loading \"$id\" application component",'system.CModule'); 392 unset($config['enabled']); 393 $component=Yii::createComponent($config); 394 $component->init(); 395 return $this->_components[$id]=$component; 396 } 397 } 398 } 399 |
| #3 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/base/CModule.php(103): CModule->getComponent("db") 098 * @return mixed the named property value 099 */ 100 public function __get($name) 101 { 102 if($this->hasComponent($name)) 103 return $this->getComponent($name); 104 else 105 return parent::__get($name); 106 } 107 108 /** |
| #4 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/portal/protected/components/StartupBehavior.php(17): CModule->__get("db") 12 **/ 13 public function beginRequest(CEvent $event) 14 { 15 $urlManager = Yii::app()->getUrlManager(); 16 $sql='select * from {{article}} where status="1"'; 17 $result=Yii::app()->db->createCommand($sql)->queryAll(); 18 19 //echo '<pre>';print_r($result);die; 20 if($result) { 21 $rules = array(); 22 foreach($result as $row) |
| #5 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/base/CComponent.php(561): StartupBehavior->beginRequest(CEvent) 556 // an array: 0 - object, 1 - method name 557 list($object,$method)=$handler; 558 if(is_string($object)) // static method call 559 call_user_func($handler,$event); 560 elseif(method_exists($object,$method)) 561 $object->$method($event); 562 else 563 throw new CException(Yii::t('yii','Event "{class}.{event}" is attached with an invalid handler "{handler}".', 564 array('{class}'=>get_class($this), '{event}'=>$name, '{handler}'=>$handler[1]))); 565 } 566 else // PHP 5.3: anonymous function |
| #6 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/base/CApplication.php(212): CComponent->raiseEvent("onbeginrequest", CEvent) 207 * Raised right BEFORE the application processes the request. 208 * @param CEvent $event the event parameter 209 */ 210 public function onBeginRequest($event) 211 { 212 $this->raiseEvent('onBeginRequest',$event); 213 } 214 215 /** 216 * Raised right AFTER the application processes the request. 217 * @param CEvent $event the event parameter |
| #7 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/yii-1.1.20.6ed384/framework/base/CApplication.php(183): CApplication->onBeginRequest(CEvent) 178 * Remember to call the parent implementation so that static application components are loaded. 179 */ 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 } |
| #8 |
+
–
/home/ahjktwet/domains/inli.ir/public_html/portal/index.php(26): CApplication->run() 21 defined('YII_DEBUG') or define('YII_DEBUG',true); 22 // specify how many levels of call stack should be shown in each log message 23 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 24 25 require_once($yii); 26 Yii::createWebApplication($config)->run(); |