本文整理汇总了PHP中Symfony\Component\Console\Application::getDefaultInputDefinition方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::getDefaultInputDefinition方法的具体用法?PHP Application::getDefaultInputDefinition怎么用?PHP Application::getDefaultInputDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Console\Application
的用法示例。
在下文中一共展示了Application::getDefaultInputDefinition方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultInputDefinition
/**
* {@inheritdoc}
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$cwdOption = new InputOption('cwd', 'w', InputOption::VALUE_OPTIONAL, 'Current working directory');
$definition->addOption($cwdOption);
return $definition;
}
示例2: getDefaultInputDefinition
/**
* Gets the default input definition.
*
* @return InputDefinition An InputDefinition instance
*/
protected function getDefaultInputDefinition()
{
$inputDefinition = parent::getDefaultInputDefinition();
$inputDefinition->addOption(new InputOption('ignore-maintenance-mode', null, InputOption::VALUE_NONE, 'Set this flag to force execution in maintenance mode'));
$inputDefinition->addOption(new InputOption('maintenance-mode', null, InputOption::VALUE_NONE, 'Set this flag to force maintenance mode while this task runs'));
return $inputDefinition;
}
示例3: getDefaultInputDefinition
/**
* Gets the default input definition.
*
* @return InputDefinition An InputDefinition instance
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('--site', '', InputOption::VALUE_REQUIRED, 'Multi-Tiki instance'));
$definition->addOption(new InputOption('--as-user', '', InputOption::VALUE_REQUIRED, 'Run the command as a different user'));
return $definition;
}
示例4: getDefaultInputDefinition
/**
* {@inheritdoc}
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->setOptions(array(new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'), new InputOption('--verbose', '-v', InputOption::VALUE_NONE, 'Increase the verbosity of messages.'), new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'), new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'), new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.')));
$definition->addOptions(array(new InputOption('--config', '-c', InputOption::VALUE_OPTIONAL, "Config script filename."), new InputOption('--dry-run', '-n', InputOption::VALUE_NONE, "Execute dry run mode.")));
return $definition;
}
示例5: getDefaultInputDefinition
protected function getDefaultInputDefinition()
{
$definitions = parent::getDefaultInputDefinition();
$definitions->addOption(new InputOption('--log', '-l', InputOption::VALUE_REQUIRED, 'Log out put to this file path'));
$definitions->addOption(new InputOption('--config', '-c', InputOption::VALUE_REQUIRED, 'YAML config file path'));
return $definitions;
}
示例6: getDefaultInputDefinition
/**
* {@inheritdoc}
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Specify a custom location for the configuration file'));
$definition->addOption(new InputOption('profile', 'p', InputOption::VALUE_REQUIRED, 'Use a profile other than the default', 'default'));
return $definition;
}
示例7: getDefaultInputDefinition
/**
* @return \Symfony\Component\Console\Input\InputDefinition|void
*/
protected function getDefaultInputDefinition()
{
$inputDefinition = parent::getDefaultInputDefinition();
$shopDirOption = new InputOption('--shopDir', '', InputOption::VALUE_OPTIONAL, 'Force oxid base dir. No auto detection');
$inputDefinition->addOption($shopDirOption);
return $inputDefinition;
}
示例8: getDefaultInputDefinition
/**
* Gets the default input definition.
*
* @return InputDefinition An InputDefinition instance
*/
protected function getDefaultInputDefinition()
{
$inputDefinition = parent::getDefaultInputDefinition();
$inputDefinition->addOption(new InputOption('ignore-maintenance-mode', null, InputOption::VALUE_NONE, 'Set this flag to force execution in maintenance mode'));
$inputDefinition->addOption(new InputOption('maintenance-mode', null, InputOption::VALUE_NONE, 'Set this flag to force maintenance mode while this task runs'));
$inputDefinition->addOption(new InputOption('environment', null, InputOption::VALUE_OPTIONAL, 'Explicitly set the environment, eg. production, dev, stage, ...'));
return $inputDefinition;
}
示例9: getDefaultInputDefinition
/**
* @inheritdoc
*/
protected function getDefaultInputDefinition()
{
$def = parent::getDefaultInputDefinition();
if (!$this->factory) {
$def->addOption(new InputOption('--config', '-c', InputOption::VALUE_OPTIONAL, 'Configuration file', self::DEFAULT_CONFIG_FILE));
}
return $def;
}
示例10: getDefaultInputDefinition
/**
* {@inheritDoc}
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('--fcgi', null, InputOption::VALUE_OPTIONAL, 'If specified, used as a connection string to FastCGI server.'));
$definition->addOption(new InputOption('--cli', null, InputOption::VALUE_NONE, 'If specified, forces adapter to cli'));
$definition->addOption(new InputOption('--tmp-dir', '-t', InputOption::VALUE_REQUIRED, 'Temporary directory to write files to'));
return $definition;
}
示例11: getDefaultInputDefinition
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('api-token', null, InputOption::VALUE_REQUIRED, 'Your api token.'));
$definition->addOption(new InputOption('user-uuid', null, InputOption::VALUE_REQUIRED, 'Your user uuid.'));
$definition->addOption(new InputOption('api-endpoint', null, InputOption::VALUE_REQUIRED, 'The api endpoint.'));
$definition->addOption(new InputOption('log', null, InputOption::VALUE_OPTIONAL, 'Add some log capability. Specify a log file if you want to change the log location.'));
return $definition;
}
示例12: getDefaultInputDefinition
/**
* Gets the default input definition.
*
* This overrides the parent default commands to allow debug, shell and
* path options.
*
* @return \Symfony\Component\Console\Input\InputDefinition
* An InputDefinition instance.
*/
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('--debug', '-d', InputOption::VALUE_NONE, 'Display timing and memory usage information.'));
$definition->addOption(new InputOption('--shell', '-s', InputOption::VALUE_NONE, 'Launch the shell.'));
$definition->addOption(new InputOption('--process-isolation', null, InputOption::VALUE_NONE, 'Launch commands from shell as a separate processes.'));
$definition->addOption(new InputOption('--path', '-p', InputOption::VALUE_REQUIRED, 'Path to SugarCRM instance root directory, defaults to current directory if none supplied.'));
return $definition;
}
示例13: getDefaultInputDefinition
protected function getDefaultInputDefinition()
{
$input = parent::getDefaultInputDefinition();
$input->setOptions(array_filter($input->getOptions(), function (InputOption $option) {
return $option->getShortcut() != 'q';
}));
$input->addOption(new InputOption('no-output', 's', InputOption::VALUE_NONE, 'Disables output, useful for debug'));
return $input;
}
示例14: getDefaultInputDefinition
protected function getDefaultInputDefinition()
{
$definition = parent::getDefaultInputDefinition();
$definition->addOption(new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Path to the config file (".buse.yml")'));
$definition->addOption(new InputOption('working-dir', 'w', InputOption::VALUE_REQUIRED, 'If specified, use the given directory as working directory.'));
$definition->addOption(new InputOption('group', 'g', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The group(s) to use'));
$definition->addOption(new InputOption('no-ignore', null, InputOption::VALUE_NONE, 'Select all repositories, even those in "global.ignore_repositories"'));
$definition->addOption(new InputOption('no-group', null, InputOption::VALUE_NONE, 'Search repositories instead of using groups defined in the config file'));
return $definition;
}
示例15: getDefaultInputDefinition
/**
* Fixes an issue with definitions of the no-interaction option not being
* completely shown in some cases
*/
protected function getDefaultInputDefinition()
{
$description = 'Do not ask any interactive question (disables code generation).';
$definition = parent::getDefaultInputDefinition();
$options = $definition->getOptions();
if (array_key_exists('no-interaction', $options)) {
$option = $options['no-interaction'];
$options['no-interaction'] = new InputOption($option->getName(), $option->getShortcut(), InputOption::VALUE_NONE, $description);
}
$options['config'] = new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Specify a custom location for the configuration file');
$definition->setOptions($options);
return $definition;
}