當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。