TYPO3  7.6
ObjectsProvider.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 namespace Symfony\Component\Console\Tests\Descriptor;
13 
21 
26 {
27  public static function getInputArguments()
28  {
29  return array(
30  'input_argument_1' => new InputArgument('argument_name', InputArgument::REQUIRED),
31  'input_argument_2' => new InputArgument('argument_name', InputArgument::IS_ARRAY, 'argument description'),
32  'input_argument_3' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'default_value'),
33  'input_argument_4' => new InputArgument('argument_name', InputArgument::REQUIRED, "multiline\nargument description"),
34  );
35  }
36 
37  public static function getInputOptions()
38  {
39  return array(
40  'input_option_1' => new InputOption('option_name', 'o', InputOption::VALUE_NONE),
41  'input_option_2' => new InputOption('option_name', 'o', InputOption::VALUE_OPTIONAL, 'option description', 'default_value'),
42  'input_option_3' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description'),
43  'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()),
44  'input_option_5' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, "multiline\noption description"),
45  'input_option_6' => new InputOption('option_name', array('o', 'O'), InputOption::VALUE_REQUIRED, 'option with multiple shortcuts'),
46  );
47  }
48 
49  public static function getInputDefinitions()
50  {
51  return array(
52  'input_definition_1' => new InputDefinition(),
53  'input_definition_2' => new InputDefinition(array(new InputArgument('argument_name', InputArgument::REQUIRED))),
54  'input_definition_3' => new InputDefinition(array(new InputOption('option_name', 'o', InputOption::VALUE_NONE))),
55  'input_definition_4' => new InputDefinition(array(
56  new InputArgument('argument_name', InputArgument::REQUIRED),
57  new InputOption('option_name', 'o', InputOption::VALUE_NONE),
58  )),
59  );
60  }
61 
62  public static function getCommands()
63  {
64  return array(
65  'command_1' => new DescriptorCommand1(),
66  'command_2' => new DescriptorCommand2(),
67  );
68  }
69 
70  public static function getApplications()
71  {
72  return array(
73  'application_1' => new DescriptorApplication1(),
74  'application_2' => new DescriptorApplication2(),
75  );
76  }
77 }