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


PHP Shell::startup方法代码示例

本文整理汇总了PHP中Shell::startup方法的典型用法代码示例。如果您正苦于以下问题:PHP Shell::startup方法的具体用法?PHP Shell::startup怎么用?PHP Shell::startup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shell的用法示例。


在下文中一共展示了Shell::startup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: startup

 /**
  * Override startup of the Shell
  *
  */
 public function startup()
 {
     parent::startup();
     if (isset($this->params['connection'])) {
         $this->connection = $this->params['connection'];
     }
     if (!in_array(Configure::read('Acl.classname'), array('DbAcl', 'DB_ACL'))) {
         $out = "--------------------------------------------------\n";
         $out .= __('Error: Your current Cake configuration is set to') . "\n";
         $out .= __('an ACL implementation other than DB. Please change') . "\n";
         $out .= __('your core config to reflect your decision to use') . "\n";
         $out .= __('DbAcl before attempting to use this script') . ".\n";
         $out .= "--------------------------------------------------\n";
         $out .= __('Current ACL Classname: %s', Configure::read('Acl.classname')) . "\n";
         $out .= "--------------------------------------------------\n";
         $this->err($out);
         $this->_stop();
     }
     if ($this->command) {
         if (!config('database')) {
             $this->out(__('Your database configuration was not found. Take a moment to create one.'), true);
             $this->args = null;
             return $this->DbConfig->execute();
         }
         require_once CONFIGS . 'database.php';
         if (!in_array($this->command, array('initdb'))) {
             $collection = new ComponentCollection();
             $this->Acl = new AclComponent($collection);
             $controller = null;
             $this->Acl->startup($controller);
         }
     }
 }
开发者ID:robotarmy,项目名称:Phog,代码行数:37,代码来源:acl.php

示例2: startup

 /**
  * Create the configuration object used in other classes.
  *
  */
 public function startup()
 {
     parent::startup();
     AssetConfig::clearAllCachedKeys();
     $this->_Config = AssetConfig::buildFromIniFile($this->params['config']);
     $this->AssetBuild->setThemes($this->_findThemes());
     $this->out();
 }
开发者ID:nojimage,项目名称:asset_compress,代码行数:12,代码来源:AssetCompressShell.php

示例3: startup

 /**
  *
  */
 public function startup()
 {
     parent::startup();
     if (!empty($this->params['y']) && !is_bool($this->params['y'])) {
         array_unshift($this->args, $this->params['y']);
         $this->interactive = false;
     }
 }
开发者ID:nojimage,项目名称:CakePHP-Kickstart-Plugin,代码行数:11,代码来源:KickstartShell.php

示例4: startup

 /**
  * Start up And load Acl Component / Aco model
  *
  * @return void
  **/
 public function startup()
 {
     parent::startup();
     $collection = new ComponentCollection();
     $this->Acl = new AclComponent($collection);
     $controller = null;
     $this->Acl->startup($controller);
     $this->Aco = $this->Acl->Aco;
 }
开发者ID:redlion09,项目名称:pcppi,代码行数:14,代码来源:AclExtrasShell.php

示例5: startup

/**
 * Shell startup, prints info message about dry run.
 *
 * @return void
 */
	public function startup() {
		parent::startup();
		if ($this->params['dry-run']) {
			$this->out(__d('cake_console', '<warning>Dry-run mode enabled!</warning>'), 1, Shell::QUIET);
		}
		if ($this->params['git'] && !is_dir('.git')) {
			$this->out(__d('cake_console', '<warning>No git repository detected!</warning>'), 1, Shell::QUIET);
		}
	}
开发者ID:sherix88,项目名称:sigedu,代码行数:14,代码来源:UpgradeShell.php

示例6: startup

 /**
  * Create the configuration object used in other classes.
  *
  */
 public function startup()
 {
     parent::startup();
     $config = null;
     if (isset($this->params['config'])) {
         $config = $this->params['config'];
     }
     AssetConfig::clearAllCachedKeys();
     $this->_Config = AssetConfig::buildFromIniFile($config);
 }
开发者ID:radig,项目名称:asset_compress,代码行数:14,代码来源:asset_compress.php

示例7: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  */
 public function startup()
 {
     parent::startup();
     $task = Inflector::classify($this->command);
     if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
         if (isset($this->params['connection'])) {
             $this->{$task}->connection = $this->params['connection'];
         }
     }
 }
开发者ID:robotarmy,项目名称:Phog,代码行数:14,代码来源:bake.php

示例8: startup

 /**
  * Loads database settings, disables console colors if requested, and
  * prevents re-entry if the current command is locked.
  *
  * @return void
  */
 function startup()
 {
     if (empty($this->Setting)) {
         App::uses('ClassRegistry', 'Utility');
         $this->Setting = ClassRegistry::init('Setting');
     }
     $this->Setting->load();
     $this->_checkColors();
     $this->_checkLock();
     parent::startup();
 }
开发者ID:hasannawaz,项目名称:pluginmirror,代码行数:17,代码来源:AppShell.php

示例9: startup

 /**
  * Assign $this->connection to the active task if a connection param is set.
  *
  * @return void
  */
 public function startup()
 {
     parent::startup();
     Configure::write('debug', 2);
     Configure::write('Cache.disable', 1);
     $task = Inflector::classify($this->command);
     if (isset($this->{$task}) && !in_array($task, array('DbConfig'))) {
         if (isset($this->params['connection'])) {
             $this->{$task}->connection = $this->params['connection'];
         }
     }
 }
开发者ID:beyondkeysystem,项目名称:MongoCake,代码行数:17,代码来源:DocumentBakeShell.php

示例10: startup

 public function startup()
 {
     parent::startup();
     if (!empty($this->params['directory'])) {
         $this->directory = $this->params['directory'];
     } else {
         $this->directory = APP . 'config' . DS . 'schema' . DS . 'data';
     }
     $this->directory .= DS;
     if (!empty($this->params['connection'])) {
         $connection = $this->params['connection'];
     }
     if (empty($this->params['name']) && !empty($this->args[0])) {
         $this->params['name'] = $this->args[0];
     }
 }
开发者ID:rewish,项目名称:CakePHP-DataShell,代码行数:16,代码来源:data.php

示例11: startup

 /**
  * Startup script
  *
  * @return void
  * @access public
  */
 function startup()
 {
     $this->_paramsParsing();
     $this->_startDBConfig();
     $this->_readPathInfo();
     if (empty($this->_versions)) {
         $last = __d('migrations', 'Nothing installed.', true);
     } else {
         $last = end($this->_versions);
         $this->lastVersion = $last['SchemaMigration']['version'];
         $last = date(__d('migrations', 'm/d/Y H:i:s', true), $last['SchemaMigration']['version']);
     }
     parent::startup();
     $this->out(__d('migrations', 'Migrations Shell', true));
     $this->hr();
     $this->out(String::insert(__d('migrations', 'Path to migrations classes: :path', true), array('path' => $this->path)));
     $this->out(String::insert(__d('migrations', 'Connection to the database: :connection', true), array('connection' => $this->connection)));
     $this->out(String::insert(__d('migrations', 'Last migration installed: :date', true), array('date' => $last)));
     $this->hr();
 }
开发者ID:jrbasso,项目名称:migrations,代码行数:26,代码来源:migration.php

示例12: startup

 /**
  * startup method
  *
  * @return void
  **/
 function startup()
 {
     App::import('Model', 'Model', false);
     parent::startup();
 }
开发者ID:surfingtonio,项目名称:flashub.com,代码行数:10,代码来源:model.php

示例13: startup

 /**
  * Startup
  *
  * @access public
  * @return void
  */
 function startup()
 {
     $this->verbose = isset($this->params['verbose']);
     $this->quiet = isset($this->params['quiet']);
     parent::startup();
 }
开发者ID:youkidearitai,项目名称:CakePHP-Media-Plugin,代码行数:12,代码来源:media.php

示例14: startup

 /**
  * startup
  *
  */
 public function startup()
 {
     parent::startup();
 }
开发者ID:dotcake,项目名称:dotcake,代码行数:8,代码来源:DotcakeShell.php

示例15: startup

 /**
  * Start up And load Acl Component / Aco model
  *
  * @return void
  **/
 public function startup()
 {
     parent::startup();
     $this->_UsersOperator->startup();
     $this->stdout->styles('ok', array('text' => 'green', 'blink' => true));
 }
开发者ID:vladshish,项目名称:usershell,代码行数:11,代码来源:UserShell.php


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