Example #1
0
 /**
  * Initializes the application by creating the command runner.
  */
 protected function init()
 {
     parent::init();
     if (empty($_SERVER['argv'])) {
         die('This script must be run from the command line.');
     }
     $this->_runner = $this->createCommandRunner();
     $this->_runner->commands = $this->commandMap;
     $this->_runner->addCommands($this->getCommandPath());
 }
Example #2
0
 /**
  * Initializes the application by creating the command runner.
  */
 protected function init()
 {
     parent::init();
     if (!isset($_SERVER['argv'])) {
         // || strncasecmp(php_sapi_name(),'cli',3))
         die('This script must be run from the command line.');
     }
     $this->_runner = $this->createCommandRunner();
     $this->_runner->commands = $this->commandMap;
     $this->_runner->addCommands($this->getCommandPath());
 }
Example #3
0
 protected function init()
 {
     parent::init();
     // preload 'request' so that it has chance to respond to onBeginRequest event.
     $this->getRequest();
 }
Example #4
0
 /**
  * Initializes the application.
  * This method overrides the parent implementation by preloading the 'request' component.
  */
 public function init()
 {
     parent::init();
     $this->setBaseUrl(Nbt::app()->request->baseUrl);
 }
Example #5
0
 /**
  * Initializes the application.
  * This method overrides the parent implementation by preloading the 'request' component.
  */
 public function init()
 {
     parent::init();
 }
Example #6
0
 protected function init()
 {
     parent::init();
 }
Example #7
0
 /**
  * initialization
  */
 protected function init()
 {
     register_shutdown_function(array($this, 'onShutdownHandler'));
     parent::init();
 }