當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。