addFormatOption() public static method

Add the --format option to a command's input definition.
public static addFormatOption ( Symfony\Component\Console\Input\InputDefinition $definition )
$definition Symfony\Component\Console\Input\InputDefinition
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('domain:get')->setDescription('Show detailed information for a domain')->addArgument('name', InputArgument::OPTIONAL, 'The domain name')->addOption('property', 'P', InputOption::VALUE_REQUIRED, 'The domain property to view');
     Table::addFormatOption($this->getDefinition());
     PropertyFormatter::configureInput($this->getDefinition());
     $this->addProjectOption();
 }
 protected function configure()
 {
     $this->setName('snapshot:list')->setAliases(['snapshots'])->setDescription('List available snapshots of an environment')->addOption('limit', null, InputOption::VALUE_REQUIRED, 'Limit the number of snapshots to list', 10)->addOption('start', null, InputOption::VALUE_REQUIRED, 'Only snapshots created before this date will be listed');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addEnvironmentOption();
     $this->addExample('List the most recent snapshots')->addExample('List snapshots made before last week', "--start '1 week ago'");
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('subscription:info')->addArgument('property', InputArgument::OPTIONAL, 'The name of the property')->setDescription('Read subscription properties');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
     $this->addExample('View all subscription properties')->addExample('View the subscription status', 'status')->addExample('View the storage limit (in MiB)', 'storage');
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('activity:list')->setAliases(['activities'])->addOption('type', null, InputOption::VALUE_REQUIRED, 'Filter activities by type')->addOption('limit', null, InputOption::VALUE_REQUIRED, 'Limit the number of results displayed', 5)->addOption('start', null, InputOption::VALUE_REQUIRED, 'Only activities created before this date will be listed')->setDescription('Get a list of activities for an environment');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addEnvironmentOption();
     $this->addExample('List recent activities on the current environment')->addExample('List recent pushes', '--type environment.push')->addExample('List pushes made before 15 March', '--type environment.push --start 2015-03-15');
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('integration:get')->setAliases(['integrations'])->addArgument('id', InputArgument::OPTIONAL, 'An integration ID. Leave blank to list integrations')->setDescription('View project integration(s)');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
     $this->setHiddenAliases(['integration:list']);
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('environment:info')->addArgument('property', InputArgument::OPTIONAL, 'The name of the property')->addArgument('value', InputArgument::OPTIONAL, 'Set a new value for the property')->addOption('refresh', null, InputOption::VALUE_NONE, 'Whether to refresh the cache')->setDescription('Read or set properties for an environment');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addEnvironmentOption()->addNoWaitOption();
     $this->addExample('Read all environment properties')->addExample("Show the environment's status", 'status')->addExample('Show the date the environment was created', 'created_at')->addExample('Enable email sending', 'enable_smtp true')->addExample('Change the environment title', 'title "New feature"')->addExample("Change the environment's parent branch", 'parent sprint-2');
     $this->setHiddenAliases(['environment:metadata']);
 }
 protected function configure()
 {
     $this->setName('tunnel:list')->setAliases(['tunnels'])->setDescription('List SSH tunnels')->addOption('all', 'a', InputOption::VALUE_NONE, 'View all tunnels');
     $this->addProjectOption();
     $this->addEnvironmentOption();
     $this->addAppOption();
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('project:info')->addArgument('property', InputArgument::OPTIONAL, 'The name of the property')->addArgument('value', InputArgument::OPTIONAL, 'Set a new value for the property')->addOption('refresh', null, InputOption::VALUE_NONE, 'Whether to refresh the cache')->setDescription('Read or set properties for a project');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addNoWaitOption();
     $this->addExample('Read all project properties')->addExample("Show the project's Git URL", 'git')->addExample("Change the project's title", 'title "My project"');
     $this->setHiddenAliases(['project:metadata']);
 }
 protected function configure()
 {
     $this->setName('tunnel:info')->setDescription("View relationship info for SSH tunnels")->addOption('property', 'P', InputOption::VALUE_REQUIRED, 'The relationship property to view')->addOption('encode', 'c', InputOption::VALUE_NONE, 'Output as base64-encoded JSON');
     $this->addProjectOption();
     $this->addEnvironmentOption();
     $this->addAppOption();
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('variable:get')->setAliases(['variables', 'vget'])->addArgument('name', InputArgument::OPTIONAL, 'The name of the variable')->addOption('pipe', null, InputOption::VALUE_NONE, 'Output the full variable value only (a "name" must be specified)')->setDescription('View variable(s) for an environment');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addEnvironmentOption();
     $this->addExample('View the variable "example"', 'example');
     $this->setHiddenAliases(['variable:list']);
 }
示例#11
0
 protected function configure()
 {
     $this->setName('db:size')->setDescription('Estimate the disk usage of a database')->setHelp("This command provides an estimate of the database's disk usage. It is not guaranteed to be reliable.");
     $this->addProjectOption()->addEnvironmentOption()->addAppOption();
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('environment:routes')->setAliases(['routes'])->setDescription('List an environment\'s routes')->addArgument('environment', InputArgument::OPTIONAL, 'The environment');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption()->addEnvironmentOption();
 }
示例#13
0
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('app:list')->setAliases(['apps'])->setDescription('Get a list of all apps in the local repository');
     Table::addFormatOption($this->getDefinition());
 }
 protected function configure()
 {
     $this->setName('ssh-key:list')->setAliases(['ssh-keys'])->setDescription('Get a list of SSH keys in your account');
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('environment:list')->setAliases(['environments'])->setDescription('Get a list of environments')->addOption('no-inactive', 'I', InputOption::VALUE_NONE, 'Do not show inactive environments')->addOption('pipe', null, InputOption::VALUE_NONE, 'Output a simple list of environment IDs.')->addOption('refresh', null, InputOption::VALUE_REQUIRED, 'Whether to refresh the list.', 1);
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
 }
 protected function configure()
 {
     $this->setName('project:list')->setAliases(['projects'])->setDescription('Get a list of all active projects')->addOption('pipe', null, InputOption::VALUE_NONE, 'Output a simple list of project IDs')->addOption('host', null, InputOption::VALUE_REQUIRED, 'Filter by region hostname (exact match)')->addOption('title', null, InputOption::VALUE_REQUIRED, 'Filter by title (case-insensitive search)')->addOption('my', null, InputOption::VALUE_NONE, 'Display only the projects you own')->addOption('refresh', null, InputOption::VALUE_REQUIRED, 'Whether to refresh the list', 1)->addOption('sort', null, InputOption::VALUE_REQUIRED, 'A property to sort by', 'title')->addOption('reverse', null, InputOption::VALUE_NONE, 'Sort in reverse (descending) order');
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('integration:list')->setAliases(['integrations'])->setDescription('View a list of project integration(s)');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
 }
 protected function configure()
 {
     $this->setName('auth:info')->setDescription('Display your account information')->addArgument('property', InputArgument::OPTIONAL, 'The account property to view')->addOption('property', 'P', InputOption::VALUE_REQUIRED, 'The account property to view (alternate syntax)')->addOption('refresh', null, InputOption::VALUE_NONE, 'Whether to refresh the cache');
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('integration:get')->addArgument('id', InputArgument::OPTIONAL, 'An integration ID. Leave blank to choose from a list.')->addOption('property', 'P', InputOption::VALUE_OPTIONAL, 'The integration property to view')->setDescription('View details of an integration');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
 }
 protected function configure()
 {
     $this->setName('project:list')->setAliases(['projects'])->setDescription('Get a list of all active projects')->addOption('pipe', null, InputOption::VALUE_NONE, 'Output a simple list of project IDs.')->addOption('refresh', null, InputOption::VALUE_REQUIRED, 'Whether to refresh the list.', 1);
     Table::addFormatOption($this->getDefinition());
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('domain:list')->setAliases(['domains'])->setDescription('Get a list of all domains');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
 }
 protected function configure()
 {
     $this->setName('user:list')->setAliases(['users'])->setDescription('List project users');
     Table::addFormatOption($this->getDefinition());
     $this->addProjectOption();
 }