Example #1
0
 /**
  * Add sub-commands.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('core', array('help' => 'Delete all cache within CakePHP', 'parser' => array('description' => 'This command will clear all cache in CakePHP using the Cache engine settings.', 'options' => array('config' => array('short' => 'c', 'help' => 'Cache Config', 'default' => 'default'), 'key' => array('short' => 'k', 'help' => 'Cache Key', 'default' => '')))));
     $parser->addSubcommand('apc', array('help' => 'Delete all cache within APC', 'parser' => array('description' => 'This command will clear all cache in APC, including user, system and opcode caches.')));
     return $parser;
 }
 /**
  * getOptionParser
  *
  * @return Parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('generate', array('help' => '<model> <version> Generate a new image version', 'boolean' => true));
     $parser->addSubcommand('remove', array('help' => '<model> <version> Remove an image version', 'boolean' => true));
     $parser->addOption('storageModel', array('short' => 's', 'help' => __('The storage model for image processing you want to use.')));
     $parser->addOption('limit', array('short' => 'l', 'help' => __('Limits the amount of records to be processed in one batch')));
     return $parser;
 }
Example #3
0
 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addOptions(array('no-colors' => array('help' => __('Do not use colors in output.'), 'boolean' => true)));
     if (!empty($this->locked_commands)) {
         $parser->addOption('skip-lock', array('short' => 's', 'help' => __('Forces the command to run even if locked.'), 'boolean' => true));
     }
     return $parser;
 }
Example #4
0
 public function getOptionParser($task = false)
 {
     $this->stdout->styles('option', array('bold' => true));
     $parser = parent::getOptionParser();
     $options = array('path' => array('short' => 'p', 'default' => 'APP', 'help' => 'comma-delimited path list (constants or strings)'), 'exclude' => array('short' => 'e', 'default' => NULL, 'help' => 'comma-delimited path exclusion list (constants or strings)'), 'mode' => array('short' => 'm', 'default' => 'interactive', 'choices' => array('interactive', 'diff', 'silent'), 'help' => "<option>interactive</option> shows errors individually and prompts for change\n" . "<option>diff</option> writes a unified diff to current directory without changing files\n" . "<option>silent</option> corrects all errors without prompting\n"), 'files' => array('short' => 'f', 'default' => 'php', 'help' => 'comma-delimited extension list, defaults to php'));
     $parser->addOptions($options);
     $parser->description('<info>Ensure code is error-free and follows conventions</info>');
     return $parser;
 }
 /**
  * {@inheritdoc}
  * 
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('There is no help');
     $taskNames = array_keys(Hash::normalize($this->tasks));
     foreach ($taskNames as $taskName) {
         $Task = $this->{$taskName};
         $parser->addSubcommand(Inflector::underscore($Task->name), array('help' => $Task->getOptionParser()->description(), 'parser' => $Task->getOptionParser()));
     }
     return $parser;
 }
Example #6
0
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description('Spec for PHP ' . DrSlump\Spec::VERSION . ' by Ivan -DrSlump- Montes');
     $parser->addOption('color', array('help' => __('turn on colored output [yes, no, *auto]'), 'choices' => array('auto', 'yes', 'no'), 'default' => 'auto'));
     $parser->addOption('debug', array('help' => 'turn on debug output', 'boolean' => true));
     $parser->addOption('filter', array('short' => 'f', 'help' => 'filter which tests to run (regexp)', 'default' => array()));
     $parser->addOption('groups', array('short' => 'g', 'help' => 'run only this group (csv)', 'default' => array()));
     $parser->addOption('exclude_groups', array('help' => 'do not run this group (csv)', 'default' => array()));
     $parser->addOption('list_groups', array('help' => 'show available groups', 'boolean' => true));
     $parser->addOption('story', array('short' => 's', 'help' => 'turn on story style formatting', 'boolean' => true));
     $parser->addOption('format', array('help' => 'output format [*dots, story]', 'choices' => array('dots', 'story'), 'default' => 'dots'));
     $parser->addOption('beep', array('short' => 'b', 'help' => 'turn on beep on failure', 'boolean' => true));
     $parser->addOption('dump', array('short' => 'd', 'help' => 'dump a spec file transformed to PHP', 'boolean' => true));
     $parser->addArgument('file', array('help' => 'spec file'));
     return $parser;
 }
Example #7
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description('The Migration shell.' . '')->addOption('plugin', array('short' => 'p', 'help' => __('Plugin name to be used')))->addOption('force', array('short' => 'f', 'help' => __('Force \'generate\' to compare all tables.')))->addOption('connection', array('short' => 'c', 'default' => 'default', 'help' => __('Set db config <config>. Uses \'default\' if none is specified.')))->addSubcommand('status', array('help' => __('Displays a status of all plugin and app migrations.')))->addSubcommand('all', array('help' => __('Bake a complete MVC. optional <name> of a Model')))->addSubcommand('run', array('help' => __('Run a migration to given direction or version.')))->addSubcommand('generate', array('help' => __('Generates a migration file.')))->addSubcommand('add', array('help' => __('Generates a migration file.')));
     /*
     
     The Migration database management for CakePHP
     ---------------------------------------------------------------
     Usage: cake migration <command> <param1> <param2>...
     ---------------------------------------------------------------
     Params:
     	-connection <config>
     		Set db config <config>. Uses 'default' if none is specified.
     
     	-plugin
     		Plugin name to be used
     
     	-f
     		Force 'generate' to compare all tables.
     
     Commands:
     	migration help
     		Shows this help message.
     
     	migration run <up|down|all|reset|version>
     		Run a migration to given direction or version.
     		Provide a version number to get directly to the version.
     		You can also use all to apply all migrations or reset to unapply all.
     
     	migration <generate|add>
     		Generates a migration file.
     		To force generation of all tables when making a comparison/dump, use the -f param.
     
     	migration status <outdated>
     		Displays a status of all plugin and app migrations.
     */
 }
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__('Generates hydrator classes for document classes.'))->addOption('filter', array('short' => 'f', 'default' => null, 'help' => __('A string pattern used to match documents that should be processed.')))->addOption('destPath', array('short' => 'd', 'default' => null, 'help' => __('The path to generate your hydrator classes. Default taken from configuration.')));
     return $parser;
 }
Example #9
0
 /**
  * Get and configure the optionparser.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addArgument('type', array('help' => __d('cake_console', 'Either a full path or type of class (model, behavior, controller, component, view, helper)')))->addArgument('className', array('help' => __d('cake_console', 'A CakePHP core class name (e.g: Component, HtmlHelper).')))->addOption('method', array('short' => 'm', 'help' => __d('cake_console', 'The specific method you want help on.')))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.'));
     return $parser;
 }
 /**
  * get the option parser.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__('Generate a new CakePHP project skeleton.'))->addArgument('name', array('help' => __('Application directory to make, if it starts with "/" the path is absolute.')))->addOption('empty', array('help' => __('Create empty files in each of the directories. Good if you are using git')))->addOption('skel', array('help' => __('The directory layout to use for the new application skeleton. Defaults to cake/console/templates/skel of CakePHP used to create the project.')));
 }
Example #11
0
 public function getOptionParser()
 {
     return parent::getOptionParser()->description(__("Better manage, and easily synchronize you application's ACO tree"))->addSubcommand('aco_update', array('help' => __('Add new ACOs for new controllers and actions. Does not remove nodes from the ACO table.')))->addSubcommand('aco_sync', array('help' => __('Perform a full sync on the ACO table.' . 'Will create new ACOs or missing controllers and actions.' . 'Will also remove orphaned entries that no longer have a matching controller/action')))->addSubcommand('verify', array('help' => __('Verify the tree structure of either your Aco or Aro Trees'), 'parser' => array('arguments' => array('type' => array('required' => true, 'help' => __('The type of tree to verify'), 'choices' => array('aco', 'aro'))))))->addSubcommand('recover', array('help' => __('Recover a corrupted Tree'), 'parser' => array('arguments' => array('type' => array('required' => true, 'help' => __('The type of tree to recover'), 'choices' => array('aco', 'aro'))))));
 }
Example #12
0
/**
 * get the option parser
 *
 * @return ConsoleOptionParser
 */
	public function getOptionParser() {
		$subcommandParser = array(
			'options' => array(
				'plugin' => array(
					'short' => 'p',
					'help' => __d('cake_console', 'The plugin to update. Only the specified plugin will be updated.')
				),
				'ext' => array(
					'short' => 'e',
					'help' => __d('cake_console', 'The extension(s) to search. A pipe delimited list, or a preg_match compatible subpattern'),
					'default' => 'php|ctp|thtml|inc|tpl'
				),
				'git' => array(
					'short' => 'g',
					'help' => __d('cake_console', 'Use git command for moving files around.'),
					'boolean' => true
				),
				'dry-run'=> array(
					'short' => 'd',
					'help' => __d('cake_console', 'Dry run the update, no files will actually be modified.'),
					'boolean' => true
				)
			)
		);

		return parent::getOptionParser()
			->description(__d('cake_console', "A shell to help automate upgrading from CakePHP 1.3 to 2.0. \n" .
				"Be sure to have a backup of your application before running these commands."))
			->addSubcommand('all', array(
				'help' => __d('cake_console', 'Run all upgrade commands.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('tests', array(
				'help' => __d('cake_console', 'Update tests class names to FooTest rather than FooTestCase.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('locations', array(
				'help' => __d('cake_console', 'Move files and folders to their new homes.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('i18n', array(
				'help' => __d('cake_console', 'Update the i18n translation method calls.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('helpers', array(
				'help' => __d('cake_console', 'Update calls to helpers.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('basics', array(
				'help' => __d('cake_console', 'Update removed basics functions to PHP native functions.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('request', array(
				'help' => __d('cake_console', 'Update removed request access, and replace with $this->request.'),
				'parser' => $subcommandParser
			))
			->addSubcommand('configure', array(
				'help' => __d('cake_console', "Update Configure::read() to Configure::read('debug')"),
				'parser' => $subcommandParser
			))
			->addSubcommand('constants', array(
				'help' => __d('cake_console', "Replace Obsolete constants"),
				'parser' => $subcommandParser
			))
			->addSubcommand('components', array(
				'help' => __d('cake_console', 'Update components to extend Component class.'),
				'parser' => $subcommandParser
			));
	}
Example #13
0
 /**
  * get the option parser
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'Bake new database configuration settings.'));
 }
Example #14
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description('The Auditable shell.' . '')->addOption('connection', array('short' => 'c', 'default' => 'default', 'help' => __d('Auditable', 'Set db config <config>. Uses \'default\' if none is specified.')))->addOption('force', array('short' => 'f', 'boolean' => true, 'help' => __d('Auditable', 'Force changes in all tables of database.')))->addSubcommand('insert', array('help' => __d('Auditable', 'Insert columns \'created_by\' and \'modified_by\' in all database tables.')))->addSubcommand('remove', array('help' => __d('Auditable', 'Remove columns \'created_by\' and \'modified_by\' from all database tables.')));
 }
Example #15
0
 /**
  * Get & configure the option parser
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'CakePHP Language String Extraction:'))->addOption('app', array('help' => __d('cake_console', 'Directory where your application is located.')))->addOption('paths', array('help' => __d('cake_console', 'Comma separated list of paths.')))->addOption('merge', array('help' => __d('cake_console', 'Merge all domain strings into the default.po file.'), 'choices' => array('yes', 'no')))->addOption('output', array('help' => __d('cake_console', 'Full path to output directory.')))->addOption('files', array('help' => __d('cake_console', 'Comma separated list of files.')))->addOption('exclude-plugins', array('boolean' => true, 'default' => true, 'help' => __d('cake_console', 'Ignores all files in plugins if this command is run inside from the same app directory.')))->addOption('plugin', array('help' => __d('cake_console', 'Extracts tokens only from the plugin specified and puts the result in the plugin\'s Locale directory.')))->addOption('ignore-model-validation', array('boolean' => true, 'default' => false, 'help' => __d('cake_console', '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', array('help' => __d('cake_console', 'If set to a value, the localization domain to be used for model validation messages.')))->addOption('exclude', array('help' => __d('cake_console', 'Comma separated list of directories to exclude. Any path containing a path segment with the provided values will be skipped. E.g. test,vendors')));
 }
 /**
  * get the option parser
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->addOption('path', array('short' => 'p', 'help' => __d('cake_console', 'Absolute path or relative to APP.')));
 }
Example #17
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description('The Bake script generates controllers, views and models for your application.' . 'If run with no command line arguments, Bake guides the user through the class' . 'creation process. You can customize the generation process by telling Bake' . 'where different parts of your application are using command line arguments.')->addSubcommand('all', array('help' => __('Bake a complete MVC. optional <name> of a Model')))->addSubcommand('project', array('help' => __('Bake a new app folder in the path supplied or in current directory if no path is specified'), 'parser' => $this->Project->getOptionParser()))->addSubcommand('plugin', array('help' => __('Bake a new plugin folder in the path supplied or in current directory if no path is specified.'), 'parser' => $this->Plugin->getOptionParser()))->addSubcommand('db_config', array('help' => __('Bake a database.php file in config directory.'), 'parser' => $this->DbConfig->getOptionParser()))->addSubcommand('model', array('help' => __('Bake a model.'), 'parser' => $this->Model->getOptionParser()))->addSubcommand('view', array('help' => __('Bake views for controllers.'), 'parser' => $this->View->getOptionParser()))->addSubcommand('controller', array('help' => __('Bake a controller.'), 'parser' => $this->Controller->getOptionParser()))->addSubcommand('fixture', array('help' => __('Bake a fixture.'), 'parser' => $this->Fixture->getOptionParser()))->addSubcommand('test', array('help' => __('Bake a unit test.'), 'parser' => $this->Test->getOptionParser()))->addOption('connection', array('help' => __('Database connection to use in conjunction with     `bake all`.'), 'short' => 'c', 'default' => 'default'));
 }
Example #18
0
 /**
  * Get and configure the Option parser
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.'))->addSubcommand('initdb', array('help' => __d('cake_console', 'Initialize the i18n table.')))->addSubcommand('extract', array('help' => __d('cake_console', 'Extract the po translations from your application'), 'parser' => $this->Extract->getOptionParser()));
 }
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(_('Utility shell similar to cake bake to provide useful command to get you started fast'))->addSubcommand('proxies', array('help' => __('Generate proxy classes for your documents.'), 'parser' => $this->Proxies->getOptionParser()))->addSubcommand('hydrators', array('help' => __('Generate hydrator classes for your documents.'), 'parser' => $this->Hydrators->getOptionParser()))->addOption('connection', array('help' => __d('cake_console', 'Database connection to use in conjunction with `bake all`.'), 'short' => 'c', 'default' => 'default'));
 }
Example #20
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description('The SoftDelete shell.' . '')->addOption('connection', array('short' => 'c', 'default' => 'default', 'help' => __d('SoftDelete', 'Set db config <config>. Uses \'default\' if none is specified.')))->addOption('force', array('short' => 'f', 'boolean' => true, 'help' => __d('SoftDelete', 'Force changes in all tables of database.')))->addSubcommand('insert', array('help' => __d('SoftDelete', 'Insert passed column in all database tables.')))->addSubcommand('remove', array('help' => __d('SoftDelete', 'Remove passed column of all database tables.')));
 }
Example #21
0
 /**
  * Get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $type = array('choices' => array('aro', 'aco'), 'required' => true, 'help' => __('Type of node to create.'));
     $parser->description('A console tool for managing the DbAcl')->addSubcommand('create', array('help' => __('Create a new ACL node'), 'parser' => array('description' => __('Creates a new ACL object <node> under the parent'), 'arguments' => array('type' => $type, 'parent' => array('help' => __('The node selector for the parent.'), 'required' => true), 'alias' => array('help' => __('The alias to use for the newly created node.'), 'required' => true)))))->addSubcommand('delete', array('help' => __('Deletes the ACL object with the given <node> reference'), 'parser' => array('description' => __('Delete an ACL node.'), 'arguments' => array('type' => $type, 'node' => array('help' => __('The node identifier to delete.'), 'required' => true)))))->addSubcommand('setparent', array('help' => __('Moves the ACL node under a new parent.'), 'parser' => array('description' => __('Moves the ACL object specified by <node> beneath <parent>'), 'arguments' => array('type' => $type, 'node' => array('help' => __('The node to move'), 'required' => true), 'parent' => array('help' => __('The new parent for <node>.'), 'required' => true)))))->addSubcommand('getpath', array('help' => __('Print out the path to an ACL node.'), 'parser' => array('description' => array(__("Returns the path to the ACL object specified by <node>."), __("This command is useful in determining the inhertiance of permissions"), __("for a certain object in the tree.")), 'arguments' => array('type' => $type, 'node' => array('help' => __('The node to get the path of'), 'required' => true)))))->addSubcommand('check', array('help' => __('Check the permissions between an ACO and ARO.'), 'parser' => array('description' => array(__("Use this command to grant ACL permissions. Once executed, the ARO "), __("specified (and its children, if any) will have ALLOW access to the"), __("specified ACO action (and the ACO's children, if any).")), 'arguments' => array('aro' => array('help' => __('ARO to check.'), 'required' => true), 'aco' => array('help' => __('ACO to check.'), 'required' => true), 'action' => array('help' => __('Action to check'), 'default' => 'all')))))->addSubcommand('grant', array('help' => __('Grant an ARO permissions to an ACO.'), 'parser' => array('description' => array(__("Use this command to grant ACL permissions. Once executed, the ARO"), __("specified (and its children, if any) will have ALLOW access to the"), __("specified ACO action (and the ACO's children, if any).")), 'arguments' => array('aro' => array('help' => __('ARO to grant permission to.'), 'required' => true), 'aco' => array('help' => __('ACO to grant access to.'), 'required' => true), 'action' => array('help' => __('Action to grant'), 'default' => 'all')))))->addSubcommand('deny', array('help' => __('Deny an ARO permissions to an ACO.'), 'parser' => array('description' => array(__("Use this command to deny ACL permissions. Once executed, the ARO"), __("specified (and its children, if any) will have DENY access to the"), __("specified ACO action (and the ACO's children, if any).")), 'arguments' => array('aro' => array('help' => __('ARO to deny.'), 'required' => true), 'aco' => array('help' => __('ACO to deny.'), 'required' => true), 'action' => array('help' => __('Action to deny'), 'default' => 'all')))))->addSubcommand('inherit', array('help' => __('Inherit an ARO\'s parent permissions.'), 'parser' => array('description' => array(__("Use this command to force a child ARO object to inherit its"), __("permissions settings from its parent.")), 'arguments' => array('aro' => array('help' => __('ARO to have permisssions inherit.'), 'required' => true), 'aco' => array('help' => __('ACO to inherit permissions on.'), 'required' => true), 'action' => array('help' => __('Action to inherit'), 'default' => 'all')))))->addSubcommand('view', array('help' => __('View a tree or a single node\'s subtree.'), 'parser' => array('description' => array(__("The view command will return the ARO or ACO tree."), __("The optional node parameter allows you to return"), __("only a portion of the requested tree.")), 'arguments' => array('type' => $type, 'node' => array('help' => __('The optional node to view the subtree of.'))))))->addSubcommand('initdb', array('help' => __('Initialize the DbAcl tables. Uses this command : cake schema run create DbAcl')))->epilog(array('Node and parent arguments can be in one of the following formats:', '', ' - <model>.<id> - The node will be bound to a specific record of the given model.', '', ' - <alias> - The node will be given a string alias (or path, in the case of <parent>)', "   i.e. 'John'.  When used with <parent>, this takes the form of an alias path,", "   i.e. <group>/<subgroup>/<parent>.", '', "To add a node at the root level, enter 'root' or '/' as the <parent> parameter."));
     return $parser;
 }
Example #22
0
 /**
  * {@inheritdoc}
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     return parent::getOptionParser()->description(__("Task for create, update groups from config"))->addSubcommand('create', array('parser' => array('options' => array()), 'help' => __('Create users')))->addSubcommand('complete', array('parser' => array('options' => array()), 'help' => __('Complete users')))->addSubcommand('update', array('parser' => array('options' => array()), 'help' => __('Update users')));
 }
Example #23
0
/**
 * get the option parser
 *
 * @return void
 */
	public function getOptionParser() {
		$parser = parent::getOptionParser();
		return $parser->description(__d('cake_console', 'Get the list of available shells for this CakePHP application.'))
			->addOption('xml', array(
				'help' => __d('cake_console', 'Get the listing as XML.'),
				'boolean' => true
			))->addOption('sort', array(
				'help' => __d('cake_console', 'Sorts the commands by where they are located.'),
				'boolean' => true
			));
	}
Example #24
0
 /**
  * getOptionParser
  *
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addOption('format', array('help' => __d('cake_console', "Generate formatted json with tab or whitespace:'tab', 'ws' or 'whitespace'")));
     return $parser;
 }
Example #25
0
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description('The Migration shell.' . '')->addOption('plugin', array('short' => 'p', 'help' => __('Plugin name to be used')))->addOption('force', array('short' => 'f', 'boolean' => true, 'help' => __('Force \'generate\' to compare all tables.')))->addOption('connection', array('short' => 'c', 'default' => 'default', 'help' => __('Set db config <config>. Uses \'default\' if none is specified.')))->addOption('no-auto-init', array('short' => 'n', 'boolean' => true, 'default' => false, 'help' => __('Disables automatic creation of migrations table and running any internal plugin migrations')))->addSubcommand('status', array('help' => __('Displays a status of all plugin and app migrations.')))->addSubcommand('all', array('help' => __('Bake a complete MVC. optional <name> of a Model')))->addSubcommand('run', array('help' => __('Run a migration to given direction or version.')))->addSubcommand('generate', array('help' => __('Generates a migration file.')))->addSubcommand('add', array('help' => __('Generates a migration file.')));
 }
Example #26
0
 /**
  * get the option parser
  *
  * @return void
  */
 public function getOptionParser()
 {
     $plugin = array('help' => __d('cake_console', 'The plugin to use.'));
     $connection = array('help' => __d('cake_console', 'Set the db config to use.'), 'default' => 'default');
     $path = array('help' => __d('cake_console', 'Path to read and write schema.php'), 'default' => APP . 'Config' . DS . 'Schema');
     $file = array('help' => __d('cake_console', 'File name to read and write.'), 'default' => 'schema.php');
     $name = array('help' => __d('cake_console', 'Classname to use. If its Plugin.class, both name and plugin options will be set.'));
     $snapshot = array('short' => 's', 'help' => __d('cake_console', 'Snapshot number to use/make.'));
     $dry = array('help' => __d('cake_console', 'Perform a dry run on create and update commands. Queries will be output instead of run.'), 'boolean' => true);
     $force = array('short' => 'f', 'help' => __d('cake_console', 'Force "generate" to create a new schema'), 'boolean' => true);
     $write = array('help' => __d('cake_console', 'Write the dumped SQL to a file.'));
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'The Schema Shell generates a schema object from the database and updates the database from the schema.'))->addSubcommand('view', array('help' => __d('cake_console', 'Read and output the contents of a schema file'), 'parser' => array('options' => compact('plugin', 'path', 'file', 'name', 'connection'), 'arguments' => compact('name'))))->addSubcommand('generate', array('help' => __d('cake_console', 'Reads from --connection and writes to --path. Generate snapshots with -s'), 'parser' => array('options' => compact('plugin', 'path', 'file', 'name', 'connection', 'snapshot', 'force'), 'arguments' => array('snapshot' => array('help' => __d('cake_console', 'Generate a snapshot.'))))))->addSubcommand('dump', array('help' => __d('cake_console', 'Dump database SQL based on a schema file to stdout.'), 'parser' => array('options' => compact('plugin', 'path', 'file', 'name', 'connection', 'write'), 'arguments' => compact('name'))))->addSubcommand('create', array('help' => __d('cake_console', 'Drop and create tables based on the schema file.'), 'parser' => array('options' => compact('plugin', 'path', 'file', 'name', 'connection', 'dry', 'snapshot'), 'args' => array('name' => array('help' => __d('cake_console', 'Name of schema to use.')), 'table' => array('help' => __d('cake_console', 'Only create the specified table.'))))))->addSubcommand('update', array('help' => __d('cake_console', 'Alter the tables based on the schema file.'), 'parser' => array('options' => compact('plugin', 'path', 'file', 'name', 'connection', 'dry', 'snapshot'), 'args' => array('name' => array('help' => __d('cake_console', 'Name of schema to use.')), 'table' => array('help' => __d('cake_console', 'Only create the specified table.'))))));
     return $parser;
 }
 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', array('help' => __d('debug_kit', 'The URL to request.'), 'required' => true))->addOption('n', array('default' => 10, 'help' => __d('debug_kit', 'Number of iterations to perform.')))->addOption('t', array('default' => 100, 'help' => __d('debug_kit', 'Maximum total time for all iterations, in seconds.' . 'If a single iteration takes more than the tiemout, 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;
 }
 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(array('Asset Compress Shell', '', 'Builds and clears assets defined in you asset_compress.ini', 'file and in your view files.'))->addSubcommand('clear', array('help' => 'Clears all builds defined in the ini file.'))->addSubcommand('build', array('help' => 'Generate all builds defined in the ini and view files.'))->addSubcommand('build_ini', array('help' => 'Generate only build files defined in the ini file.'))->addSubcommand('build_dynamic', array('help' => 'Build build files defined in view files.'))->addOption('config', array('help' => 'Choose the config file to use.', 'short' => 'c', 'default' => APP . 'Config' . DS . 'asset_compress.ini'))->addOption('force', array('help' => 'Force assets to rebuild. Ignores timestamp rules.', 'short' => 'f', 'boolean' => true));
 }
 function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('all', array('short' => 'a', 'help' => __('Searches and compiles all twig templates it finds to JS.')))->description(__('Twig to JS compiler.'));
     return $parser;
 }
Example #30
0
 /**
  * Gets the option parser for this shell and populates it with the command information for this shell
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->addSubcommand('start', ['help' => __('Starts and runs both the websocket service and the flashpolicy.')])->description(__('Ratchet Websocket service.'))->addOption('verbose', ['help' => 'Enable verbose output.', 'short' => 'v', 'boolean' => true]);
     return $parser;
 }