initialize() public method

Initializes the Shell acts as constructor for subclasses allows configuration of tasks prior to shell execution
public initialize ( ) : void
return void
Example #1
4
 /**
  * Initialization. Used to disconnect default loggers from consoleIO output
  * and instantiating Cakebox objects.
  *
  * @return void
  */
 public function initialize()
 {
     $this->_io->setLoggers(false);
     $this->Info = new CakeboxInfo();
     $this->Execute = new CakeboxExecute();
     parent::initialize();
 }
Example #2
3
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->loadModel('UsersTypeMissions');
     $this->loadModel('Missions');
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('News');
     $this->loadModel('Activities');
     $this->loadModel('Inquiries');
 }
Example #4
1
 /**
  * Initialize method
  */
 public function initialize()
 {
     $paths = App::path('Shell/Task', 'CodeBlastrQueue');
     foreach ($paths as $path) {
         $Folder = new Folder($path);
         $res = array_merge($this->tasks, $Folder->find('Queue.+\\.php'));
         foreach ($res as &$r) {
             $r = 'CodeBlastrQueue.' . basename($r, 'Task.php');
         }
         $this->tasks = $res;
     }
     parent::initialize();
 }
Example #5
1
 /**
  * initialize() method.
  *
  * @return bool|int Success or error code.
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->loadModel('JobFuncs');
 }
Example #6
0
 /**
  * Defines constants that are required by phinx to get running
  *
  * @return void
  */
 public function initialize()
 {
     if (!defined('PHINX_VERSION')) {
         define('PHINX_VERSION', 0 === strpos('@PHINX_VERSION@', '@PHINX_VERSION') ? '0.4.3' : '@PHINX_VERSION@');
     }
     parent::initialize();
 }
Example #7
0
 /**
  * Overwrite shell initialize to dynamically load all Queue Related Tasks.
  *
  * @return void
  */
 public function initialize()
 {
     $plugins = Plugin::loaded();
     foreach ($plugins as $plugin) {
         $pluginPaths = App::path('Shell/Task', $plugin);
         foreach ($pluginPaths as $pluginPath) {
             $Folder = new Folder($pluginPath);
             $res = $Folder->find('Queue.+Task\\.php');
             foreach ($res as &$r) {
                 $r = $plugin . '.' . basename($r, 'Task.php');
             }
             $this->tasks = array_merge($this->tasks, $res);
         }
     }
     $paths = App::path('Shell/Task');
     foreach ($paths as $path) {
         $Folder = new Folder($path);
         $res = array_merge($this->tasks, $Folder->find('Queue.+\\.php'));
         foreach ($res as &$r) {
             $r = basename($r, 'Task.php');
         }
         $this->tasks = $res;
     }
     parent::initialize();
     $this->QueuedTasks->initConfig();
 }
 /**
  * initialize method
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->adaptiveImagesController = new AdaptiveImagesController();
 }
Example #9
0
 public function initialize()
 {
     parent::initialize();
     $this->ApprovedVlanTable = $this->loadModel('ApprovedVlan');
     $this->MigratorTable = $this->loadModel('Migrator');
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Notifications');
 }
Example #11
0
 /**
  * Initializes the Shell
  * acts as constructor for subclasses
  * allows configuration of tasks prior to shell execution
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->paths = ['%bower_asset_path%' => Configure::read('Assetic.path.bower'), '%npm_asset_path%' => Configure::read('Assetic.path.npm')];
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Passwords');
     $this->loadModel('Members');
 }
 public function initialize()
 {
     $this->tasks = Configure::read('CacheCleaner.tasks');
     $this->_mergeVars(['tasks'], ['associative' => ['tasks']]);
     parent::initialize();
 }
Example #14
0
 public function initialize()
 {
     parent::initialize();
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Markers');
 }
 /**
  * initialize() method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('LineBotCallback.LineCallbacks');
     $this->loadModel('LineBotCallback.Messages');
 }
Example #17
0
 public function initialize()
 {
     parent::initialize();
     $this->Dir = new Folder(CACHE);
     $this->_cacheDirs = Configure::read('CacheCleaner.Dir.dirs') === true ? $this->Dir->read()[0] : Configure::read('CacheCleaner.Dir.dirs');
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Incidents');
     $this->loadModel('Reports');
 }
Example #19
0
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Raspis');
 }
Example #20
0
 /**
  * initialize callback
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->Users = $this->loadModel(Configure::read('Users.table'));
 }
Example #21
0
 /**
  * Inicializa o shell, carregando os models necessários.
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Devices');
     $this->loadModel('DeviceSoftware');
 }
Example #22
-1
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('EmailStacks');
     $this->loadModel('News');
 }