|
@@ 177-184 (lines=8) @@
|
| 174 |
|
* @throws Exception |
| 175 |
|
* @api |
| 176 |
|
*/ |
| 177 |
|
protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null) |
| 178 |
|
{ |
| 179 |
|
if (array_key_exists($name, $this->argumentDefinitions)) { |
| 180 |
|
throw new Exception( |
| 181 |
|
'Argument "' . $name . '" has already been defined, thus it should not be defined again.', |
| 182 |
|
1253036401 |
| 183 |
|
); |
| 184 |
|
} |
| 185 |
|
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue); |
| 186 |
|
return $this; |
| 187 |
|
} |
|
@@ 203-210 (lines=8) @@
|
| 200 |
|
* @throws Exception |
| 201 |
|
* @api |
| 202 |
|
*/ |
| 203 |
|
protected function overrideArgument($name, $type, $description, $required = false, $defaultValue = null) |
| 204 |
|
{ |
| 205 |
|
if (!array_key_exists($name, $this->argumentDefinitions)) { |
| 206 |
|
throw new Exception( |
| 207 |
|
'Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', |
| 208 |
|
1279212461 |
| 209 |
|
); |
| 210 |
|
} |
| 211 |
|
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue); |
| 212 |
|
return $this; |
| 213 |
|
} |