當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Shell::initialize方法代碼示例

本文整理匯總了PHP中Shell::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shell::initialize方法的具體用法?PHP Shell::initialize怎麽用?PHP Shell::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Shell的用法示例。


在下文中一共展示了Shell::initialize方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initialize

 /**
  * initialize
  *
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     if ($this->_dataPath == null) {
         $this->_dataPath = APP . 'Plugin' . DS . 'Ekidata' . DS . 'Vendor' . DS . 'data' . DS;
     }
 }
開發者ID:go2coffee,項目名稱:CakePHP2-Ekidata,代碼行數:12,代碼來源:ImportTask.php

示例2: initialize

 /**
  * 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();
 }
開發者ID:predominant,項目名稱:referee,代碼行數:13,代碼來源:errors.php

示例3: 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();
 }
開發者ID:pefringant,項目名稱:cron-mailer,代碼行數:12,代碼來源:cron_mailer.php

示例4: initialize

 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);
 }
開發者ID:neggiel,項目名稱:senju,代碼行數:10,代碼來源:send.php

示例5: initialize

 /**
  * 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);
 }
開發者ID:Galvanio,項目名稱:Kinspir,代碼行數:18,代碼來源:app_shell.php

示例6: initialize

 /**
  * 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();
 }
開發者ID:ElThac0,項目名稱:cakephp_queue,代碼行數:27,代碼來源:QueueShell.php

示例7: initialize

 /**
  * initialize
  *
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
 }
開發者ID:go2coffee,項目名稱:CakePHP2-Ekidata,代碼行數:9,代碼來源:EkidataImportShell.php


注:本文中的Shell::initialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。