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


PHP BakeTask::getOptionParser方法代码示例

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


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

示例1: getOptionParser

/**
 * get the option parser.
 *
 * @return void
 */
	public function getOptionParser() {
		$parser = parent::getOptionParser();
		return $parser->description(
			__d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.')
		)->addArgument('name', array(
			'help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.')
		))->addOption('count', array(
			'help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'),
			'short' => 'n',
			'default' => 10
		))->addOption('connection', array(
			'help' => __d('cake_console', 'Which database configuration to use for baking.'),
			'short' => 'c',
			'default' => 'default'
		))->addOption('plugin', array(
			'help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'),
			'short' => 'p',
		))->addOption('records', array(
			'help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, where [n] is either --count or the default of 10'),
			'short' => 'r',
			'boolean' => true
		))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
	}
开发者ID:hungnt88,项目名称:5stars-1,代码行数:28,代码来源:FixtureTask.php

示例2: getOptionParser

 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__d('cake_console', 'Bake models.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the model to bake. Can use Plugin.name to bake plugin models.')))->addSubcommand('all', array('help' => __d('cake_console', 'Bake all model files with associations and validation.')))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'Plugin to bake the model into.')))->addOption('connection', array('short' => 'c', 'help' => __d('cake_console', 'The connection the model table is on.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
 }
开发者ID:juliushermosura,项目名称:globeloop,代码行数:10,代码来源:ModelTask.php

示例3: getOptionParser

 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Bake a controller for a model. Using options you can bake public, admin or both.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the controller to bake. Can use Plugin.name to bake controllers into plugins.')))->addOption('public', array('help' => __d('cake_console', 'Bake a controller with basic crud actions (index, view, add, edit, delete).'), 'boolean' => true))->addOption('admin', array('help' => __d('cake_console', 'Bake a controller with crud actions for one of the Routing.prefixes.'), 'boolean' => true))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'Plugin to bake the controller into.')))->addOption('connection', array('short' => 'c', 'help' => __d('cake_console', 'The connection the controller\'s model is on.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->addSubcommand('all', array('help' => __d('cake_console', 'Bake all controllers with CRUD methods.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }
开发者ID:hotanlam,项目名称:japansource,代码行数:11,代码来源:ControllerTask.php

示例4: getOptionParser

 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Bake test case skeletons for classes.'))->addArgument('type', array('help' => __d('cake_console', 'Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), 'choices' => array('Controller', 'controller', 'Model', 'model', 'Helper', 'helper', 'Component', 'component', 'Behavior', 'behavior')))->addArgument('name', array('help' => __d('cake_console', 'An existing class to bake tests for.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('plugin', array('short' => 'p', 'help' => __d('cake_console', 'CamelCased name of the plugin to bake tests for.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }
开发者ID:agashish,项目名称:test_new,代码行数:11,代码来源:TestTask.php

示例5: getOptionParser

 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->description(__('Bake test case skeletons for classes.'))->addArgument('type', array('help' => __('Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), 'choices' => array('controller', 'model', 'helper', 'component', 'behavior')))->addArgument('name', array('help' => __('An existing class to bake tests for.')))->addOption('plugin', array('short' => 'p', 'help' => __('CamelCased name of the plugin to bake tests for.')))->epilog(__('Omitting all arguments and options will enter into an interactive mode.'));
 }
开发者ID:no2key,项目名称:Web-Framework-Benchmark,代码行数:10,代码来源:test.php

示例6: getOptionParser

 /**
  * get the option parser.
  *
  * @return void
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     return $parser->addOption('plugin', array('short' => 'l', 'help' => __d('cake_console', 'Plugin.')))->addOption('appTestCase', array('short' => 'z', 'help' => __d('cake_console', 'App test case.')))->addOption('noAppTestCase', array('short' => 'n', 'help' => __d('cake_console', 'App test case.')))->addOption('slug', array('short' => 's', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('parentSlug', array('short' => 'f', 'boolean' => true, 'help' => __d('cake_console', 'Use slug.')))->addOption('user', array('short' => 'u', 'help' => __d('cake_console', 'Use user model.')))->addOption('parent', array('short' => 'r', 'help' => __d('cake_console', 'Use parent model.')))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'theme.')))->addOption('subthemes', array('short' => 'b', 'help' => __d('cake_console', 'subthemes.')))->addOption('property', array('short' => 'y', 'boolean' => true, 'help' => __d('cake_console', 'generate IDE properties hints for model relations')));
 }
开发者ID:br-nhan,项目名称:AjaxTemplate,代码行数:10,代码来源:ExtControllerTask.php

示例7: getOptionParser

 /**
  * Gets the option parser instance and configures it.
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description(__d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.'))->addArgument('name', array('help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.')))->addOption('count', array('help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'), 'short' => 'n', 'default' => 1))->addOption('connection', array('help' => __d('cake_console', 'Which database configuration to use for baking.'), 'short' => 'c', 'default' => 'default'))->addOption('plugin', array('help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'), 'short' => 'p'))->addOption('schema', array('help' => __d('cake_console', 'Importing schema for fixtures rather than hardcoding it.'), 'short' => 's', 'boolean' => TRUE))->addOption('theme', array('short' => 't', 'help' => __d('cake_console', 'Theme to use when baking code.')))->addOption('force', array('short' => 'f', 'help' => __d('cake_console', 'Force overwriting existing files without prompting.')))->addOption('records', array('help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, ' . 'where [n] is either --count or the default of 10.'), 'short' => 'r', 'boolean' => TRUE))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));
     return $parser;
 }
开发者ID:mrbadao,项目名称:api-official,代码行数:11,代码来源:FixtureTask.php


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