本文整理汇总了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;
}
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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();
}
示例7: initialize
/**
* initialize
*
* @access public
*/
public function initialize()
{
parent::initialize();
}