/** * 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()); }
/** * 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()); }
protected function init() { parent::init(); // preload 'request' so that it has chance to respond to onBeginRequest event. $this->getRequest(); }
/** * 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); }
/** * Initializes the application. * This method overrides the parent implementation by preloading the 'request' component. */ public function init() { parent::init(); }
protected function init() { parent::init(); }
/** * initialization */ protected function init() { register_shutdown_function(array($this, 'onShutdownHandler')); parent::init(); }