Is the equivalent of Cake\Controller\Controller on the command line.
Наследование: use trait Cake\ORM\Locator\LocatorAwareTrait, use trait Cake\Log\LogTrait, use trait Cake\Utility\MergeVariablesTrait, use trait Cake\Datasource\ModelAwareTrait
Пример #1
2
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('Asset Management for CakePHP.');
     foreach ($this->_taskMap as $task => $config) {
         $taskParser = $this->{$task}->getOptionParser();
         $parser->addSubcommand(Inflector::underscore($task), ['help' => $taskParser->description(), 'parser' => $taskParser]);
     }
     return $parser;
 }
Пример #2
1
 /**
  * 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.1' : '@PHINX_VERSION@');
     }
     parent::initialize();
 }
 /**
  * main() method.
  *
  * @return bool|int Success or error code.
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('initialize', ['help' => 'Execute The Initialize-method. This will add some important data to your database.', 'parser' => $this->Initialize->getOptionParser()]);
     $parser->addSubcommand('user', ['help' => 'Execute The User-task. You will be able to create an user.', 'parser' => $this->User->getOptionParser()]);
     return $parser;
 }
Пример #4
1
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Users');
     $this->loadModel('UsersTypeMissions');
     $this->loadModel('Missions');
 }
 public function initialize()
 {
     parent::initialize();
     $this->loadModel('News');
     $this->loadModel('Activities');
     $this->loadModel('Inquiries');
 }
Пример #6
1
 /**
  * {@inheritDoc}
  */
 public function __construct(ConsoleIo $io = null)
 {
     parent::__construct($io);
     if (strtolower(substr(php_uname('s'), 0, 3)) === 'win') {
         $this->_mkdirCommand = 'mkdir';
     }
 }
Пример #7
1
 /**
  * Return the help options and validate arguments
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('generate', ['help' => __('Regenerate thumbnails for a specific table.'), 'parser' => ['description' => [__('Use this command to regenerate the thumbnails for a specific table.')], 'arguments' => ['table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]], 'options' => ['path-class' => ['short' => 'p', 'help' => __('Fully name spaced custom path class, you must use double backslash.')], 'image-class' => ['short' => 'i', 'help' => __('Fully name spaced custom image transform class, you must use double backslash.')]]]]);
     $parser->addSubcommand('cleanup', ['help' => __('Clean up old images on the file system which are not linked in the database.'), 'parser' => ['description' => [__('This command will delete images which are not part of the model configuration.')], 'arguments' => ['table' => ['help' => __('The table to regenerate thumbs for'), 'required' => true]], 'options' => ['dry-run' => ['short' => 'd', 'help' => __('Do a dry run and don\'t delete any files.'), 'boolean' => true]]]]);
     return $parser;
 }
Пример #8
1
 /**
  * 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();
 }
Пример #9
1
 /**
  * Manage the available sub-commands along with their arguments and help
  *
  * @see http://book.cakephp.org/3.0/en/console-and-shells.html#configuring-options-and-generating-help
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('merge', ['help' => 'Merge po file.']);
     $parser->addSubcommand('schema', ['help' => 'Generate po file from schema.']);
     return $parser;
 }
 /**
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('cleanup', ['help' => 'Log rotation and other cleanup.']);
     $parser->addSubcommand('reset', ['help' => 'Resets the database, truncates all data. Use -q to skip confirmation.']);
     $parser->addSubcommand('test_entry', ['help' => 'Adds a test entry with a certain log type.', 'parser' => ['arguments' => ['level' => ['help' => 'The log level to use ("' . implode('", "', Log::levels()) . '"), defaults to "info"', 'required' => false], 'message' => ['help' => 'The message, defaults to "test"', 'required' => false], 'context' => ['help' => 'The scope key, defaults to none', 'required' => false]]]]);
     return $parser;
 }
Пример #11
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $infoParser = $parser->toArray();
     $infoParser['arguments']['url'] = ['help' => 'Absolute URL', 'required' => false];
     $parser->description('Cache Shell to cleanup caching of view files.')->addSubcommand('info', ['help' => 'Infos about the files', 'parser' => $infoParser])->addSubcommand('clear', ['help' => 'Clear all or part of the files', 'parser' => $parser]);
     return $parser;
 }
Пример #12
0
 /**
  * Get the option parser for this shell.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('list_prefixes', ['help' => 'Show a list of all defined cache prefixes.']);
     $parser->addSubcommand('clear_all', ['help' => 'Clear all caches.']);
     $parser->addSubcommand('clear', ['help' => 'Clear the cache for a specified prefix.', 'parser' => ['description' => ['Clear the cache for a particular prefix.', 'For example, `cake cache clear _cake_model_` will clear the model cache', 'Use `cake cache list_prefixes` to list available prefixes'], 'arguments' => ['prefix' => ['help' => 'The cache prefix to be cleared.', 'required' => true]]]]);
     return $parser;
 }
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addOption('config', ['default' => 'default', 'help' => 'Name of a queue config to use', 'short' => 'c']);
     $parser->addOption('queue', ['help' => 'Name of queue to override from loaded config', 'short' => 'Q']);
     $parser->addOption('logger', ['help' => 'Name of a configured logger', 'default' => 'stdout', 'short' => 'l']);
     $parser->addOption('worker', ['choices' => ['Sequential', 'Test'], 'default' => 'Sequential', 'help' => 'Name of worker class', 'short' => 'w'])->description(__('Runs a Queuesadilla worker.'));
     return $parser;
 }
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addOption('adapter', ['short' => 'a', 'help' => __('The adapter config name to use.'), 'default' => 'Local']);
     $parser->addOption('model', ['short' => 'm', 'help' => __('The model / table to use.'), 'default' => 'Burzum/FileStorage.FileStorage']);
     $parser->addSubcommand('image', ['help' => __('Image Processing Task.'), 'parser' => $this->Image->getOptionParser()]);
     $parser->addSubcommand('store', ['help' => __('Stores a file in the DB.')]);
     return $parser;
 }
Пример #15
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addOption('engine', ['choices' => ['Beanstalk', 'Iron', 'Memory', 'Mysql', 'Null', 'Redis', 'Synchronous'], 'default' => 'Mysql', 'help' => 'Name of engine', 'short' => 'e']);
     $parser->addOption('queue', ['help' => 'Name of a queue', 'short' => 'q']);
     $parser->addOption('logger', ['help' => 'Name of a configured logger', 'default' => 'stdout', 'short' => 'l']);
     $parser->addOption('worker', ['choices' => ['Sequential', 'Test'], 'default' => 'Sequential', 'help' => 'Name of worker class', 'short' => 'w'])->description(__('Runs a Queuesadilla worker.'));
     return $parser;
 }
Пример #16
0
 /**
  * Manage the available sub-commands along with their arguments and help
  *
  * @see http://book.cakephp.org/3.0/en/console-and-shells.html#configuring-options-and-generating-help
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $updateFromCatalogParser = parent::getOptionParser();
     $updateFromCatalogParser->addOption('domain', ['default' => 'default', 'help' => 'The domain to use']);
     $updateFromCatalogParser->addOption('overwrite', ['default' => false, 'help' => 'If set, there will be no interactive question whether to continue.', 'boolean' => true]);
     $updateFromCatalogParser->addOption('strip-references', ['boolean' => true, 'help' => 'Whether to remove file usage references from resulting po and mo files.']);
     return $parser->description(['CkTools Shell', '', 'Utilities'])->addSubcommand('updateFromCatalog', ['help' => 'Updates the PO file from the given catalog', 'parser' => $updateFromCatalogParser]);
     return $parser;
 }
 /**
  * getOptionParser method
  *
  * @return $parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $this->_io->styles('green_text', ['text' => 'green', 'blink' => true]);
     $this->_io->styles('red_text', ['text' => 'red', 'blink' => true]);
     $this->_io->styles('blue_text', ['text' => 'blue', 'blink' => true]);
     $parser->addSubcommand('start_caching', ['help' => 'Cache and optimize original image in plugin webroot cache folder', 'parser' => ['description' => [__("<warning>This subcommand uses for cache and optimize all images from "), __("source folder to cache folder. Cache options gets from "), __("adaptive_image_config.php in /config dir. You also can "), __("disable image optimization if argument 'optimization' = false. "), __("If cache folder already exists - all images will be recached. </warning>")], 'arguments' => ['optimization' => ['help' => __('Enable\\Disable image optimization; boolean; <blue_text>(default: true)</blue_text>'), 'required' => false], 'src_path' => ['help' => __('Folder for source images, root is : /webroot/img/. <blue_text>(default: \'src_images\')</blue_text>'), 'required' => false]]]]);
     $parser->addSubcommand('clear_cache', ['help' => 'Remove cache folder', 'parser' => ['description' => [__("<warning>Remove cache folder with cached images</warning>")]]]);
     $parser->addSubcommand('check_for_img_tags', ['help' => 'Show places in code, where don\'t uses AdaptiveImgHelper for images; Search in /src dir', 'parser' => ['description' => [__("<warning>Show places in code, where don't uses AdaptiveImgHelper for images; Search in /src dir</warning>")]]]);
     return $parser;
 }
Пример #18
0
 /**
  * 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();
 }
 /**
  * @inheritDoc
  */
 public function startup()
 {
     parent::startup();
     $storageTable = 'Burzum/FileStorage.ImageStorage';
     if (isset($this->params['storageTable'])) {
         $storageTable = $this->params['storageTable'];
     }
     $this->Table = TableRegistry::get($storageTable);
     if (isset($this->params['limit'])) {
         if (!is_numeric($this->params['limit'])) {
             $this->out(__d('file_storage', '--limit must be an integer!'));
             $this->_stop();
         }
         $this->limit = $this->params['limit'];
     }
 }
Пример #20
0
 /**
  *
  * @return OptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('Users', 'Utilities for CakeDC Users Plugin'))->addSubcommand('activateUser')->description(__d('Users', 'Activate an specific user'))->addSubcommand('addSuperuser')->description(__d('Users', 'Add a new superadmin user for testing purposes'))->addSubcommand('addUser')->description(__d('Users', 'Add a new user'))->addSubcommand('changeRole')->description(__d('Users', 'Change the role for an specific user'))->addSubcommand('deactivateUser')->description(__d('Users', 'Deactivate an specific user'))->addSubcommand('deleteUser')->description(__d('Users', 'Delete an specific user'))->addSubcommand('passwordEmail')->description(__d('Users', 'Reset the password via email'))->addSubcommand('resetAllPasswords')->description(__d('Users', 'Reset the password for all users'))->addSubcommand('resetPassword')->description(__d('Users', 'Reset the password for an specific user'))->addOptions(['username' => ['short' => 'u', 'help' => 'The username for the new user'], 'password' => ['short' => 'p', 'help' => 'The password for the new user'], 'email' => ['short' => 'e', 'help' => 'The email for the new user']]);
     return $parser;
 }
Пример #21
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('CakePHP Language String Extraction:')->addOption('app', ['help' => 'Directory where your application is located.'])->addOption('paths', ['help' => 'Comma separated list of paths.'])->addOption('merge', ['help' => 'Merge all domain strings into the default.po file.', 'choices' => ['yes', 'no']])->addOption('output', ['help' => 'Full path to output directory.'])->addOption('files', ['help' => 'Comma separated list of files.'])->addOption('exclude-plugins', ['boolean' => true, 'default' => true, 'help' => 'Ignores all files in plugins if this command is run inside from the same app directory.'])->addOption('plugin', ['help' => 'Extracts tokens only from the plugin specified and puts the result in the plugin\'s Locale directory.'])->addOption('ignore-model-validation', ['boolean' => true, 'default' => false, 'help' => 'Ignores validation messages in the $validate property.' . ' If this flag is not set and the command is run from the same app directory,' . ' all messages in model validation rules will be extracted as tokens.'])->addOption('validation-domain', ['help' => 'If set to a value, the localization domain to be used for model validation messages.'])->addOption('exclude', ['help' => 'Comma separated list of directories to exclude.' . ' Any path containing a path segment with the provided values will be skipped. E.g. test,vendors'])->addOption('overwrite', ['boolean' => true, 'default' => false, 'help' => 'Always overwrite existing .pot files.'])->addOption('extract-core', ['help' => 'Extract messages from the CakePHP core libs.', 'choices' => ['yes', 'no']])->addOption('no-location', ['boolean' => true, 'default' => false, 'help' => 'Do not write file locations for each extracted message.']);
     return $parser;
 }
Пример #22
0
 /**
  * Get option parser.
  *
  * @return \Cake\Console\OptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('debug_kit', 'Allows you to obtain some rough benchmarking statistics' . 'about a fully qualified URL.'))->addArgument('url', ['help' => __d('debug_kit', 'The URL to request.'), 'required' => true])->addOption('n', ['default' => 10, 'help' => __d('debug_kit', 'Number of iterations to perform.')])->addOption('t', ['default' => 100, 'help' => __d('debug_kit', 'Maximum total time for all iterations, in seconds.' . 'If a single iteration takes more than the timeout, only one request will be made')])->epilog(__d('debug_kit', 'Example Use: `cake benchmark --n 10 --t 100 http://localhost/testsite`. ' . '<info>Note:</info> this benchmark does not include browser render times.'));
     return $parser;
 }
Пример #23
0
 /**
  * Override the default behavior to save the command called
  * in order to pass it to the command dispatcher
  *
  * {@inheritDoc}
  */
 public function runCommand($argv, $autoMethod = false, $extra = [])
 {
     array_unshift($argv, 'migrations');
     $this->argv = $argv;
     return parent::runCommand($argv, $autoMethod, $extra);
 }
Пример #24
0
 /**
  * Configure command line options and arguments.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('Provides a mechanism for loading data into any of Cake\'s configured databases.')->addSubcommand('init', ['help' => 'Initialize a new, empty seed file. Respects both the --dev and --file options.'])->addOption('dev', ['short' => 'd', 'boolean' => true, 'default' => false, 'help' => 'Use the "dev" seed file instead of the default.'])->addOption('file', ['short' => 'f', 'help' => 'Manually specify the file that should be used. When this option is present, its argument will always be used explicitly, overriding the --dev option if it is also present.']);
     return $parser;
 }
 /**
  * get the option parser.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(['Asset Compress Shell', '', 'Builds and clears assets defined in your asset_compress.ini', 'file and in your view files.'])->addSubcommand('clear', ['help' => 'Clears all builds defined in the ini file.'])->addSubcommand('build', ['help' => 'Generate all builds defined in the ini files.'])->addOption('force', ['help' => 'Force assets to rebuild. Ignores timestamp rules.', 'short' => 'f', 'boolean' => true]);
 }
Пример #26
0
 /**
  * Create the task instance.
  *
  * Part of the template method for Cake\Core\ObjectRegistry::load()
  *
  * @param string $class The classname to create.
  * @param string $alias The alias of the task.
  * @param array $settings An array of settings to use for the task.
  * @return \Cake\Console\Shell The constructed task class.
  */
 protected function _create($class, $alias, $settings)
 {
     return new $class($this->_Shell->io());
 }
Пример #27
0
 /**
  * Get option parser method to parse commandline options
  *
  * @return OptionParser
  */
 public function getOptionParser()
 {
     $subcommandParser = ['options' => []];
     $subcommandParserFull = $subcommandParser;
     $subcommandParserFull['options']['group'] = ['short' => 'g', 'help' => 'Group', 'default' => ''];
     return parent::getOptionParser()->description("Simple and minimalistic job queue (or deferred-task) system.")->addSubcommand('clean', ['help' => 'Remove old jobs (cleanup)', 'parser' => $subcommandParser])->addSubcommand('add', ['help' => 'Add Job', 'parser' => $subcommandParser])->addSubcommand('install', ['help' => 'Install info', 'parser' => $subcommandParser])->addSubcommand('uninstall', ['help' => 'Uninstall info', 'parser' => $subcommandParser])->addSubcommand('stats', ['help' => 'Stats', 'parser' => $subcommandParserFull])->addSubcommand('reset', ['help' => 'Stats', 'parser' => $subcommandParserFull])->addSubcommand('runworker', ['help' => 'Run Worker', 'parser' => $subcommandParserFull]);
 }
Пример #28
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(['PHP Built-in Server for CakePHP', '<warning>[WARN] Don\'t use this at the production environment</warning>'])->addOption('host', ['short' => 'H', 'help' => 'ServerHost'])->addOption('port', ['short' => 'p', 'help' => 'ListenPort'])->addOption('document_root', ['short' => 'd', 'help' => 'DocumentRoot']);
     return $parser;
 }
Пример #29
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return \Cake\Console\ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('Used by shells like bash to autocomplete command name, options and arguments')->addSubcommand('commands', ['help' => 'Output a list of available commands', 'parser' => ['description' => 'List all availables']])->addSubcommand('subcommands', ['help' => 'Output a list of available subcommands', 'parser' => ['description' => 'List subcommands for a command', 'arguments' => ['command' => ['help' => 'The command name', 'required' => false]]]])->addSubcommand('options', ['help' => 'Output a list of available options', 'parser' => ['description' => 'List options', 'arguments' => ['command' => ['help' => 'The command name', 'required' => false]]]])->addSubcommand('fuzzy', ['help' => 'Guess autocomplete'])->epilog(['This command is not intended to be called manually']);
     return $parser;
 }
Пример #30
0
 /**
  * Get the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  * @see Shell::getOptionParser()
  */
 public function getOptionParser()
 {
     $startParserArguments = ['options' => ['user' => ['short' => 'u', 'help' => __d('cake_resque', 'User running the workers')], 'queue' => ['short' => 'q', 'help' => __d('cake_resque', 'Name of the queue. If multiple queues, separe with comma.')], 'interval' => ['short' => 'i', 'help' => __d('cake_resque', 'Pause time in seconds between each works')], 'workers' => ['short' => 'n', 'help' => __d('cake_resque', 'Number of workers to fork')], 'log' => ['short' => 'l', 'help' => __d('cake_resque', 'Log path')], 'log-handler' => ['help' => __d('cake_resque', 'Log Handler to use for logging.')], 'log-handler-target' => ['help' => __d('cake_resque', 'Log Handler arguments')], 'verbose' => ['short' => 'v', 'help' => __d('cake_resque', 'Log more verbose informations'), 'boolean' => true], 'debug' => ['short' => 'd', 'help' => __d('cake_resque', 'Print debug informations'), 'boolean' => true]]];
     $startSchedulerParserArguments = ['options' => ['user' => ['short' => 'u', 'help' => __d('cake_resque', 'User running the workers')], 'interval' => ['short' => 'i', 'help' => __d('cake_resque', 'Pause time in seconds between each works')], 'log' => ['short' => 'l', 'help' => __d('cake_resque', 'Log path')], 'log-handler' => ['help' => __d('cake_resque', 'Log Handler to use for logging.')], 'log-handler-target' => ['help' => __d('cake_resque', 'Log Handler arguments')], 'verbose' => ['short' => 'v', 'help' => __d('cake_resque', 'Log more verbose informations'), 'boolean' => true]]];
     $stopParserArguments = ['options' => ['force' => ['short' => 'f', 'help' => __d('cake_resque', 'Force workers shutdown, forcing all the current jobs to finish (and fail)'), 'boolean' => true], 'all' => ['short' => 'a', 'help' => __d('cake_resque', 'Shutdown all workers'), 'boolean' => true]], 'description' => [__d('cake_resque', 'Stop one or all workers'), __d('cake_resque', 'Unless you force the stop with the --force option,'), __d('cake_resque', 'the worker will wait for all jobs to complete'), __d('cake_resque', 'before shutting down')]];
     $pauseParserArguments = ['options' => ['all' => ['short' => 'a', 'help' => __d('cake_resque', 'Pause all workers'), 'boolean' => true], 'debug' => ['short' => 'd', 'help' => __d('cake_resque', 'Print debug informations'), 'boolean' => true]], 'description' => [__d('cake_resque', 'Pause one or all workers'), __d('cake_resque', 'Pausing is only supported on Unix system,'), __d('cake_resque', 'with PHP pcntl extension installed')]];
     $resumeParserArguments = ['options' => ['all' => ['short' => 'a', 'help' => __d('cake_resque', 'Resume all paused workers'), 'boolean' => true], 'debug' => ['short' => 'd', 'help' => __d('cake_resque', 'Print debug informations'), 'boolean' => true]], 'description' => [__d('cake_resque', 'Resume one or all paused workers'), __d('cake_resque', 'Resuming is only supported on Unix system,'), __d('cake_resque', 'with PHP pcntl extension installed')]];
     $cleanupParserArguments = ['options' => ['all' => ['short' => 'a', 'help' => __d('cake_resque', 'Clean up all workers'), 'boolean' => true], 'debug' => ['short' => 'd', 'help' => __d('cake_resque', 'Print debug informations'), 'boolean' => true]], 'description' => [__d('cake_resque', 'Cleaning Up one or all paused workers'), __d('cake_resque', 'Cleaning Up will immedately terminate the job'), __d('cake_resque', 'the worker is currently working on.'), __d('cake_resque', 'Resuming is only supported on Unix system,'), __d('cake_resque', 'with PHP pcntl extension installed')]];
     $clearParserArguments = ['options' => ['all' => ['short' => 'a', 'help' => __d('cake_resque', 'Clear all queues'), 'boolean' => true], 'debug' => ['short' => 'd', 'help' => __d('cake_resque', 'Print debug informations'), 'boolean' => true]], 'description' => [__d('cake_resque', 'Clear one or all queues'), __d('cake_resque', 'Clearing a queue will remove all its jobs')]];
     return parent::getOptionParser()->description(__d('cake_resque', "A Shell to manage PHP Resque") . "\n" . __d('cake_resque', "Version " . CakeResqueShell::VERSION) . "\n" . "Wan Chen (" . date('Y') . ")")->addSubcommand('start', ['help' => __d('cake_resque', 'Start a new worker.'), 'parser' => $startParserArguments])->addSubcommand('startscheduler', ['help' => __d('cake_resque', 'Start a new scheduler worker.'), 'parser' => $startSchedulerParserArguments])->addSubcommand('stop', ['help' => __d('cake_resque', 'Stop a worker.'), 'parser' => $stopParserArguments])->addSubcommand('pause', ['help' => __d('cake_resque', 'Pause a worker.'), 'parser' => $pauseParserArguments])->addSubcommand('resume', ['help' => __d('cake_resque', 'Resume a paused worker.'), 'parser' => $resumeParserArguments])->addSubcommand('cleanup', ['help' => __d('cake_resque', 'Immediately terminate a worker job execution.'), 'parser' => $cleanupParserArguments])->addSubcommand('restart', ['help' => __d('cake_resque', 'Stop all Resque workers, and start a new one.'), 'parser' => array_merge_recursive($startParserArguments, $stopParserArguments)])->addSubcommand('clear', ['help' => __d('cake_resque', 'Clear all jobs inside a queue'), 'parser' => $clearParserArguments])->addSubcommand('reset', ['help' => __d('cake_resque', 'Reset CakeResque internal worker\'s saved status'), 'parser' => $clearParserArguments])->addSubcommand('stats', ['help' => __d('cake_resque', 'View stats about processed/failed jobs.')])->addSubcommand('tail', ['help' => __d('cake_resque', 'Tail the workers logs.')])->addSubcommand('track', ['help' => __d('cake_resque', 'Track a job status.')])->addSubcommand('load', ['help' => __d('cake_resque', 'Load a set of predefined workers.')])->addSubcommand('enqueue', ['help' => __d('cake_resque', 'Enqueue a job.')]);
 }