public function __construct($args, $projectPath, $environment = Application::ENVIRONMENT_DEV) { $this->projectPath = $projectPath; $this->args = $args; $this->application = new Application($this, $projectPath, $environment); parent::__construct(); }
/** * Console constructor - set the dependency Injector * * @package las * @version 1.0 * * @param \Phalcon\DiInterface $di */ public function __construct(\Phalcon\DiInterface $di) { $this->_di = $di; $loaders = array('config', 'loader', 'assets', 'db', 'router'); // Register services foreach ($loaders as $service) { $this->{$service}(); } // Register modules $this->registerModules(array('cli' => array('className' => 'Las\\Cli\\Module', 'path' => ROOT_PATH . '/app/cli/Module.php'))); // Register the app itself as a service $this->_di->set('app', $this); // Set the dependency Injector parent::__construct($this->_di); }
/** * Console constructor - set the dependency Injector. * * @param \Phalcon\DiInterface $di */ public function __construct(DiInterface $di) { $this->_di = $di; $this->_stderr = $this->_stdout = ''; $this->_isSingleInstance = $this->_isRecording = false; $this->_task = $this->_action = null; $this->_params = array(); $this->_taskId = null; $loaders = array('config', 'loader', 'db', 'router', 'markdown', 'mail', 'view', 'queue'); // Register services foreach ($loaders as $service) { $this->{$service}(); } // Register the app itself as a service $this->_di->set('app', $this); // Set the dependency Injector parent::__construct($this->_di); }
/** * Constructor * * @param \Phalcon\DI $di */ public function __construct($di) { parent::__construct($di); }