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


PHP Application::getDefaultInputDefinition方法代码示例

本文整理汇总了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;
 }
开发者ID:jiabin,项目名称:migraine,代码行数:10,代码来源:Application.php

示例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;
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:12,代码来源:Application.php

示例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;
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:12,代码来源:Application.php

示例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;
 }
开发者ID:sickhye,项目名称:php-db-migrate,代码行数:10,代码来源:Application.php

示例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;
 }
开发者ID:renegare,项目名称:depipe,代码行数:7,代码来源:Console.php

示例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;
 }
开发者ID:toin0u,项目名称:concise-cli,代码行数:10,代码来源:Application.php

示例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;
 }
开发者ID:marcharding,项目名称:oxrun,代码行数:10,代码来源:Application.php

示例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;
 }
开发者ID:solverat,项目名称:pimcore,代码行数:13,代码来源:Application.php

示例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;
 }
开发者ID:lazypdo,项目名称:migrator,代码行数:11,代码来源:Application.php

示例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;
 }
开发者ID:behcetenuygun,项目名称:cachetool,代码行数:11,代码来源:Application.php

示例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;
 }
开发者ID:ftdysa,项目名称:insight,代码行数:9,代码来源:Application.php

示例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;
 }
开发者ID:insulin,项目名称:cli,代码行数:18,代码来源:Application.php

示例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;
 }
开发者ID:kadet1090,项目名称:KeyLighter,代码行数:9,代码来源:Application.php

示例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;
 }
开发者ID:iamluc,项目名称:buse,代码行数:10,代码来源:Application.php

示例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;
 }
开发者ID:netGALAXYStudios,项目名称:ourmovingapp,代码行数:17,代码来源:Application.php


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