/** * initialize * * @access public */ public function initialize() { parent::initialize(); if ($this->_dataPath == null) { $this->_dataPath = APP . 'Plugin' . DS . 'Ekidata' . DS . 'Vendor' . DS . 'data' . DS; } }
/** * Initialization method. We have to jump through some hoops to * allow our shell to work correctly from a plugin path. * @return null * @access public */ public function initialize() { require realpath(CAKE . '..' . DS) . DS . 'app' . DS . 'config' . DS . 'database.php'; require CAKE . 'libs' . DS . 'model' . DS . 'model.php'; require CAKE . 'libs' . DS . 'model' . DS . 'app_model.php'; parent::initialize(); }
/** * Initialize shell */ function initialize() { parent::initialize(); if (Configure::load('cron_mailer') !== false) { $this->settings = array_merge($this->settings, Configure::read('CronMailer')); } App::import('Component', 'CronMailer.CronMailer'); $this->CronMailer =& new CronMailerComponent(); }
function initialize() { parent::initialize(); App::import('Core', 'Controller'); App::import('Component', 'Qdmail'); $this->Controller =& new Controller(); $this->Qdmail =& new QdmailComponent(null); $this->Qdmail->startup($this->Controller); }
/** * Initialize method * * @return null * @access public */ public function initialize() { // Call our parent's initialize() parent::initialize(); // Merge any parameters into our settings $this->_mergeSettings($this->params); // Set our debug and silent levels $this->debug = array_key_exists('debug', $this->params); $this->silent = array_key_exists('silent', $this->params); // Attach ourselves to the ClassRegistry as 'Shell' ClassRegistry::addObject('Shell', $this); }
/** * Overwrite shell initialize to dynamically load all Queue Related Tasks. */ public function initialize() { App::import('Folder'); foreach (App::path('shells') as $path) { $folder = new Folder($path . DS . 'Task'); $this->tasks = array_merge($this->tasks, $folder->find('queue.*\\.php')); } // strip the extension fom the found task(file)s foreach ($this->tasks as &$task) { $task = basename($task, 'Task.php'); } //Config can be overwritten via local app config. Configure::load('queue'); $conf = Configure::read('queue'); if (!is_array($conf)) { $conf = array(); } //merge with default configuration vars. Configure::write('queue', array_merge(array('sleeptime' => 10, 'gcprop' => 10, 'defaultworkertimeout' => 120, 'defaultworkerretries' => 4, 'workermaxruntime' => 0, 'cleanuptimeout' => 2000, 'exitwhennothingtodo' => false), $conf)); if (isset($this->params['-verbose'])) { $this->_verbose = true; } parent::initialize(); }
/** * initialize * * @access public */ public function initialize() { parent::initialize(); }