|
@@ 260-267 (lines=8) @@
|
| 257 |
|
* @throws Exception |
| 258 |
|
* @api |
| 259 |
|
*/ |
| 260 |
|
protected function registerArgument($name, $type, $description, $required = false, $defaultValue = null) |
| 261 |
|
{ |
| 262 |
|
if (array_key_exists($name, $this->argumentDefinitions)) { |
| 263 |
|
throw new Exception( |
| 264 |
|
'Argument "' . $name . '" has already been defined, thus it should not be defined again.', |
| 265 |
|
1253036401 |
| 266 |
|
); |
| 267 |
|
} |
| 268 |
|
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue); |
| 269 |
|
return $this; |
| 270 |
|
} |
|
@@ 286-293 (lines=8) @@
|
| 283 |
|
* @throws Exception |
| 284 |
|
* @api |
| 285 |
|
*/ |
| 286 |
|
protected function overrideArgument($name, $type, $description, $required = false, $defaultValue = null) |
| 287 |
|
{ |
| 288 |
|
if (!array_key_exists($name, $this->argumentDefinitions)) { |
| 289 |
|
throw new Exception( |
| 290 |
|
'Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', |
| 291 |
|
1279212461 |
| 292 |
|
); |
| 293 |
|
} |
| 294 |
|
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue); |
| 295 |
|
return $this; |
| 296 |
|
} |