/** * 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); } } }
/** * 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(); }
/** * */ 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; } }
/** * 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; }
/** * 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); } }
/** * 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); }
/** * 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']; } } }
/** * 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(); }
/** * 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']; } } }
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]; } }
/** * 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(); }
/** * startup method * * @return void **/ function startup() { App::import('Model', 'Model', false); parent::startup(); }
/** * Startup * * @access public * @return void */ function startup() { $this->verbose = isset($this->params['verbose']); $this->quiet = isset($this->params['quiet']); parent::startup(); }
/** * startup * */ public function startup() { parent::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)); }
/** * Start up And load Acl Component / Aco model * * @return void **/ public function startup() { parent::startup(); $this->AclExtras->startup(); $this->AclExtras->Shell = $this; }
/** * Disable caching for baking. * This forces the most current database schema to be used. * * @return void */ function startup() { Configure::write('Cache.disable', 1); parent::startup(); }
/** * startup * * @return void */ public function startup() { if (empty($this->params['xml'])) { parent::startup(); } }
function startup() { parent::startup(); // 文字コード指定 $this->encode = Configure::read('App.encoding'); }
/** * Start up And load Acl Component / Aco model * * @return void **/ public function startup() { parent::startup(); $this->PermissionsExtras->startup(); $this->PermissionsExtras->Shell = $this; }
public function startup() { $this->log($this->name . ' started', LOG_DEBUG); parent::startup(); }