本文整理汇总了PHP中Cake\Console\Shell::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Shell::initialize方法的具体用法?PHP Shell::initialize怎么用?PHP Shell::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cake\Console\Shell
的用法示例。
在下文中一共展示了Shell::initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize()
{
parent::initialize();
$this->loadModel('Users');
$this->loadModel('UsersTypeMissions');
$this->loadModel('Missions');
}
示例2: initialize
/**
* 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();
}
示例3: initialize
/**
* 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();
}
示例4: initialize
/**
* initialize() method.
*
* @return bool|int Success or error code.
*/
public function initialize()
{
parent::initialize();
$this->loadModel('Users');
$this->loadModel('JobFuncs');
}
示例5: initialize
/**
* 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();
}
示例6: initialize
/**
* 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();
}
示例7: initialize
/**
* initialize method
*
* @return void
*/
public function initialize()
{
parent::initialize();
$this->loadModel('Users');
$this->adaptiveImagesController = new AdaptiveImagesController();
}
示例8: initialize
public function initialize()
{
parent::initialize();
$this->ApprovedVlanTable = $this->loadModel('ApprovedVlan');
$this->MigratorTable = $this->loadModel('Migrator');
}
示例9: initialize
public function initialize()
{
parent::initialize();
$this->loadModel('Notifications');
}
示例10: initialize
/**
* 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')];
}
示例11: initialize
public function initialize()
{
parent::initialize();
$this->loadModel('Passwords');
$this->loadModel('Members');
}
示例12: initialize
public function initialize()
{
$this->tasks = Configure::read('CacheCleaner.tasks');
$this->_mergeVars(['tasks'], ['associative' => ['tasks']]);
parent::initialize();
}
示例13: initialize
public function initialize()
{
parent::initialize();
}
示例14: initialize
/**
* initialize() method.
*
* @return void
*/
public function initialize()
{
parent::initialize();
$this->loadModel('LineBotCallback.LineCallbacks');
$this->loadModel('LineBotCallback.Messages');
}
示例15: initialize
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');
}