当前位置: 首页>>代码示例>>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;未经允许,请勿转载。