getDefaultInputDefinition() protected method

Gets the default input definition.
protected getDefaultInputDefinition ( ) : Symfony\Component\Console\Input\InputDefinition
return Symfony\Component\Console\Input\InputDefinition An InputDefinition instance
コード例 #1
0
ファイル: Application.php プロジェクト: jiabin/migraine
 /**
  * {@inheritdoc}
  */
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $cwdOption = new InputOption('cwd', 'w', InputOption::VALUE_OPTIONAL, 'Current working directory');
     $definition->addOption($cwdOption);
     return $definition;
 }
コード例 #2
0
 /**
  * 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
0
ファイル: Application.php プロジェクト: rjsmelo/tiki
 /**
  * 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
0
 /**
  * {@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
0
ファイル: Console.php プロジェクト: renegare/depipe
 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
0
ファイル: Application.php プロジェクト: toin0u/concise-cli
 /**
  * {@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
0
ファイル: Application.php プロジェクト: marcharding/oxrun
 /**
  * @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
0
ファイル: Application.php プロジェクト: solverat/pimcore
 /**
  * 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
0
ファイル: Application.php プロジェクト: lazypdo/migrator
 /**
  * @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
0
 /**
  * {@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
0
ファイル: Application.php プロジェクト: ftdysa/insight
 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
0
ファイル: Application.php プロジェクト: insulin/cli
 /**
  * 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
0
ファイル: Application.php プロジェクト: kadet1090/KeyLighter
 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
0
ファイル: Application.php プロジェクト: iamluc/buse
 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
0
 /**
  * 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;
 }
コード例 #16
0
ファイル: application.php プロジェクト: TupambaeNet/phpbb
	/**
	* {@inheritdoc}
	*/
	protected function getDefaultInputDefinition()
	{
		$input_definition = parent::getDefaultInputDefinition();

		$input_definition->addOption(new InputOption(
			'safe-mode',
			null,
			InputOption::VALUE_NONE,
			$this->language->lang('CLI_DESCRIPTION_OPTION_SAFE_MODE')
		));

		return $input_definition;
	}
コード例 #17
0
ファイル: Application.php プロジェクト: phpzone/phpzone
 /**
  * @return InputDefinition An InputDefinition instance
  */
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $options = $definition->getOptions();
     unset($options['ansi']);
     unset($options['no-ansi']);
     $options['colors'] = new InputOption('colors', null, InputOption::VALUE_NONE, 'Force ANSI color in the output, by default a color support is' . ' guessed based on your platform and the output if not specified');
     $options['no-colors'] = new InputOption('no-colors', null, InputOption::VALUE_NONE, 'Force no ANSI color in the output');
     $options['init'] = new InputOption('init', null, InputOption::VALUE_NONE, 'Initialize the configuration file <comment>(phpzone.yml)</comment>');
     $options['config'] = new InputOption('config', 'c', InputOption::VALUE_REQUIRED, 'Specify a custom location for the configuration file');
     $options['shell'] = new InputOption('shell', 's', InputOption::VALUE_NONE, 'Launch the shell environment');
     $definition->setOptions($options);
     return $definition;
 }
コード例 #18
0
 protected function getDefaultInputDefinition()
 {
     // To preserve backwards compatibility we strip shortcuts from default options as they overlap with the
     // shortcuts from previous versions of Wsdl2PhpGenerator.
     // TODO: v3: Remove this for version 3.x where we can break backwards compatibility.
     $removeShortcuts = array('n', 'q');
     $updatedOptions = array();
     $inputDefinition = parent::getDefaultInputDefinition();
     foreach ($inputDefinition->getOptions() as $option) {
         if (in_array($option->getShortcut(), $removeShortcuts)) {
             // The shortcut should be stripped so create a replacement option without it.
             $updatedOptions[] = new InputOption($option->getName(), null, InputOption::VALUE_NONE, $option->getDescription(), null);
         } else {
             // No shortcut collision so we can reuse the existing option.
             $updatedOptions[] = $option;
         }
     }
     // Replace the original options with the updated set.
     $inputDefinition->setOptions($updatedOptions);
     return $inputDefinition;
 }
コード例 #19
0
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $definition->addOption(new InputOption('--working-dir', '-w', InputOption::VALUE_REQUIRED, 'If specified, use the given directory as working directory.'));
     return $definition;
 }
コード例 #20
0
ファイル: Application.php プロジェクト: janhartigan/framework
 /**
  * Get the default input definitions for the applications.
  *
  * This is used to add the --env option to every available command.
  *
  * @return \Symfony\Component\Console\Input\InputDefinition
  */
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $definition->addOption($this->getEnvironmentOption());
     return $definition;
 }
コード例 #21
0
ファイル: Application.php プロジェクト: hanovruslan/composer
 /**
  * {@inheritDoc}
  */
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $definition->addOption(new InputOption('--profile', null, InputOption::VALUE_NONE, 'Display timing and memory usage information'));
     $definition->addOption(new InputOption('--working-dir', '-d', InputOption::VALUE_REQUIRED, 'If specified, use the given directory as working directory.'));
     return $definition;
 }
コード例 #22
0
ファイル: Application.php プロジェクト: jsiefer/n98-magerun2
 /**
  * @return \Symfony\Component\Console\Input\InputDefinition|void
  */
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     $rootDirOption = new InputOption('--root-dir', '', InputOption::VALUE_OPTIONAL, 'Force magento root dir. No auto detection');
     $inputDefinition->addOption($rootDirOption);
     $skipExternalConfig = new InputOption('--skip-config', '', InputOption::VALUE_OPTIONAL, 'Do not load any custom config.');
     $inputDefinition->addOption($skipExternalConfig);
     $skipExternalConfig = new InputOption('--skip-root-check', '', InputOption::VALUE_OPTIONAL, 'Do not check if n98-magerun runs as root');
     $inputDefinition->addOption($skipExternalConfig);
     return $inputDefinition;
 }
コード例 #23
0
 /**
  * Add global a --config option.
  *
  * @return InputDefinition
  */
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     $inputDefinition->addOption(new InputOption('config', 'c', InputOption::VALUE_OPTIONAL, 'Use custom path for config'));
     return $inputDefinition;
 }
コード例 #24
0
ファイル: Application.php プロジェクト: webcreate/conveyor
 /**
  * @inheritdoc
  */
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     $inputDefinition->addOption(new InputOption('--configuration', '-c', InputOption::VALUE_REQUIRED, 'Configuration file override'));
     return $inputDefinition;
 }
コード例 #25
0
ファイル: Application.php プロジェクト: ktomk/n98-magerun2
 /**
  * @return InputDefinition
  */
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     /**
      * Root dir
      */
     $rootDirOption = new InputOption('--root-dir', '', InputOption::VALUE_OPTIONAL, 'Force magento root dir. No auto detection');
     $inputDefinition->addOption($rootDirOption);
     /**
      * Skip config
      */
     $skipExternalConfig = new InputOption('--skip-config', '', InputOption::VALUE_NONE, 'Do not load any custom config.');
     $inputDefinition->addOption($skipExternalConfig);
     /**
      * Skip root check
      */
     $skipExternalConfig = new InputOption('--skip-root-check', '', InputOption::VALUE_NONE, 'Do not check if n98-magerun runs as root');
     $inputDefinition->addOption($skipExternalConfig);
     /**
      * Skip core commands
      */
     $skipMagento2CoreCommands = new InputOption('--skip-core-commands', '', InputOption::VALUE_OPTIONAL, 'Do not include Magento 2 core commands');
     $inputDefinition->addOption($skipMagento2CoreCommands);
     return $inputDefinition;
 }
コード例 #26
0
ファイル: Application.php プロジェクト: llaville/grumphp
 /**
  * {@inheritdoc}
  */
 protected function getDefaultInputDefinition()
 {
     $definition = parent::getDefaultInputDefinition();
     $definition->addOption(new InputOption('config', 'c', InputOption::VALUE_OPTIONAL, 'Path to config', $this->getConfigDefaultPath()));
     return $definition;
 }
コード例 #27
0
ファイル: Application.php プロジェクト: b-viguier/phpbench
 /**
  * {@inheritdoc}
  */
 protected function getDefaultInputDefinition()
 {
     $default = parent::getDefaultInputDefinition();
     $default->addOptions(array(new InputOption('--config', null, InputOption::VALUE_REQUIRED)));
     return $default;
 }
コード例 #28
0
ファイル: application.php プロジェクト: MrAdder/phpbb
 /**
  * {@inheritdoc}
  */
 protected function getDefaultInputDefinition()
 {
     $input_definition = parent::getDefaultInputDefinition();
     $this->register_global_options($input_definition);
     return $input_definition;
 }
コード例 #29
0
ファイル: Application.php プロジェクト: lemonphp/deploy
 /**
  * {@inheritdoc}
  */
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     $inputDefinition->addOption(new InputOption('--file', '-f', InputOption::VALUE_OPTIONAL, 'Specify deploy script file to load'));
     return $inputDefinition;
 }
コード例 #30
0
ファイル: Carew.php プロジェクト: carew/carew
 protected function getDefaultInputDefinition()
 {
     $inputDefinition = parent::getDefaultInputDefinition();
     $inputDefinition->addOptions(array(new InputOption('base-dir', null, InputOption::VALUE_REQUIRED, 'The location of your content', getcwd())));
     return $inputDefinition;
 }