src/delivery/web/ActionForm.php 1 location
|
@@ 40-46 (lines=7) @@
|
| 37 |
|
* @return WebField |
| 38 |
|
* @throws \Exception |
| 39 |
|
*/ |
| 40 |
|
private function getActionField(Parameter $actionParameter, FieldRegistry $fields) { |
| 41 |
|
$actionField = $fields->getField($actionParameter); |
| 42 |
|
if ($actionField instanceof WebField) { |
| 43 |
|
return $actionField; |
| 44 |
|
} |
| 45 |
|
throw new \Exception(get_class($actionField) . " must implement WebField"); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
private function readParameters(ParameterReader $reader, FieldRegistry $fields, Action $action) { |
| 49 |
|
$values = [ |
src/delivery/cli/InteractiveCliParameterReader.php 1 location
|
@@ 59-66 (lines=8) @@
|
| 56 |
|
* @return \rtens\domin\delivery\cli\CliField |
| 57 |
|
* @throws \Exception |
| 58 |
|
*/ |
| 59 |
|
private function getField(Parameter $parameter) { |
| 60 |
|
$field = $this->fields->getField($parameter); |
| 61 |
|
if (!($field instanceof CliField)) { |
| 62 |
|
$fieldClass = get_class($field); |
| 63 |
|
throw new \Exception("Not a CliField [$fieldClass]"); |
| 64 |
|
} |
| 65 |
|
return $field; |
| 66 |
|
} |
| 67 |
|
} |