当前位置: 首页>>代码示例>>PHP>>正文


PHP Shell::initialize方法代码示例

本文整理汇总了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');
 }
开发者ID:fxleblanc,项目名称:Website,代码行数:7,代码来源:SendMailShell.php

示例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();
 }
开发者ID:alt3,项目名称:cakebox-console,代码行数:13,代码来源:AppShell.php

示例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();
 }
开发者ID:codeblastr,项目名称:queue,代码行数:16,代码来源:QueueShell.php

示例4: initialize

 /**
  * initialize() method.
  *
  * @return bool|int Success or error code.
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->loadModel('JobFuncs');
 }
开发者ID:jeffblack360,项目名称:cakeblog,代码行数:11,代码来源:UserShell.php

示例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();
 }
开发者ID:thanghexp,项目名称:project,代码行数:12,代码来源:MigrationsShell.php

示例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();
 }
开发者ID:repher,项目名称:cakephp-queue,代码行数:31,代码来源:QueueShell.php

示例7: initialize

 /**
  * initialize method
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->adaptiveImagesController = new AdaptiveImagesController();
 }
开发者ID:e2e4gu,项目名称:adaptive-image-plugin,代码行数:11,代码来源:CacheImagesShell.php

示例8: initialize

 public function initialize()
 {
     parent::initialize();
     $this->ApprovedVlanTable = $this->loadModel('ApprovedVlan');
     $this->MigratorTable = $this->loadModel('Migrator');
 }
开发者ID:bamboorat,项目名称:sbmmigrator,代码行数:6,代码来源:HelloShell.php

示例9: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Notifications');
 }
开发者ID:ujjwalwahi,项目名称:error-reporting-server,代码行数:5,代码来源:CleanOldNotifsShell.php

示例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')];
 }
开发者ID:phpie,项目名称:assetic-plugin,代码行数:12,代码来源:DumpTask.php

示例11: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Passwords');
     $this->loadModel('Members');
 }
开发者ID:nguyennghiem1205,项目名称:japan-circle,代码行数:6,代码来源:UpdatePasswordShell.php

示例12: initialize

 public function initialize()
 {
     $this->tasks = Configure::read('CacheCleaner.tasks');
     $this->_mergeVars(['tasks'], ['associative' => ['tasks']]);
     parent::initialize();
 }
开发者ID:daoandco,项目名称:cakephp-cachecleaner,代码行数:6,代码来源:ClearShell.php

示例13: initialize

 public function initialize()
 {
     parent::initialize();
 }
开发者ID:visonforcoding,项目名称:ckblog,代码行数:4,代码来源:AdminShell.php

示例14: initialize

 /**
  * initialize() method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('LineBotCallback.LineCallbacks');
     $this->loadModel('LineBotCallback.Messages');
 }
开发者ID:lecaoquochung,项目名称:line-bot-callback,代码行数:11,代码来源:ParseTask.php

示例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');
 }
开发者ID:daoandco,项目名称:cakephp-cachecleaner,代码行数:6,代码来源:DirTask.php


注:本文中的Cake\Console\Shell::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。