本文整理汇总了PHP中BakeTask类的典型用法代码示例。如果您正苦于以下问题:PHP BakeTask类的具体用法?PHP BakeTask怎么用?PHP BakeTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BakeTask类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Execution method always used for tasks
* Handles dispatching to interactive, named, or all processes.
*
* @return void
*/
public function execute()
{
parent::execute();
if (empty($this->args)) {
$this->_interactive();
}
if (isset($this->args[0])) {
$this->interactive = false;
if (!isset($this->connection)) {
$this->connection = 'default';
}
if (strtolower($this->args[0]) === 'all') {
return $this->all();
}
$model = $this->_modelName($this->args[0]);
$this->bake($model);
}
}
开发者ID:galabyca,项目名称:nostalgames,代码行数:24,代码来源: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:
/**
* Override initialize
*
* @access public
*/
function __construct(&$dispatch)
{
parent::__construct($dispatch);
$this->path = $this->params['working'] . DS . 'tests' . DS . 'fixtures' . DS;
}
开发者ID:ambagasdowa,项目名称:kml,代码行数:10,代码来源:fixture.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 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
示例5: 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
示例6: 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
示例7: 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
注:本文中的BakeTask类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论