Jump to content
Larry Ullman's Book Forums

Yii Bootstrap - Where Is Run() Method Located?


Recommended Posts

Here is the Yii BootStrap code


// change the following paths if necessary
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);


I am confused as to where to find the run method in the YiiBase.php class i couldn't see it but can find the createWebApplication method with no problems.

Link to comment
Share on other sites

Whoops i spoke to soon found it in CApplication.php


public function run()
$this->onbeginRequest(new CEvent($this));
$this->onendRequest(new CEvent($this));


Complicated stuff, Yii class extends YiiBase, then we call the static method which then calls another method within the class to create a new class and return its instance where by then we can use the run method.


Reading the YiiBook is one thing, but investing all those Classes is another.

  • Upvote 1
Link to comment
Share on other sites


  • Create New...