1 | <?php |
||
16 | class SymfonyConsoleDiDto |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $name; |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $description; |
||
26 | /** |
||
27 | * @var InputDefinition |
||
28 | */ |
||
29 | private $definition; |
||
30 | |||
31 | /** |
||
32 | * @param string $name |
||
33 | * @param string $description |
||
34 | * @param InputDefinition $inputDefinition |
||
35 | */ |
||
36 | 3 | public function __construct($name = null, $description = null, InputDefinition $inputDefinition = null) |
|
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @return SymfonyConsoleDiDto |
||
46 | */ |
||
47 | 1 | public function setName($name) |
|
53 | |||
54 | /** |
||
55 | * @param string $name |
||
56 | * @return SymfonyConsoleDiDto |
||
57 | */ |
||
58 | 1 | public function setDescription($description) |
|
64 | |||
65 | /** |
||
66 | * Adds an argument. |
||
67 | * |
||
68 | * @param string $name The argument name |
||
69 | * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
||
70 | * @param string $description A description text |
||
71 | * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) |
||
72 | * |
||
73 | * @return Command The current instance |
||
74 | */ |
||
75 | 3 | public function addArgument($name, $mode = null, $description = '', $default = null) |
|
81 | |||
82 | /** |
||
83 | * Adds an option. |
||
84 | * |
||
85 | * @param string $name The option name |
||
86 | * @param string $shortcut The shortcut (can be null) |
||
87 | * @param int $mode The option mode: One of the InputOption::VALUE_* constants |
||
88 | * @param string $description A description text |
||
89 | * @param mixed $default The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE) |
||
|
|||
90 | * |
||
91 | * @return Command The current instance |
||
92 | */ |
||
93 | 3 | public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 3 | public function getName() |
|
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 3 | public function getDescription() |
|
115 | |||
116 | /** |
||
117 | * @return InputDefinition |
||
118 | */ |
||
119 | 3 | public function getDefinition() |
|
123 | } |
||
124 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.