| 1 | <?php |
||
| 12 | class SwitchChoose implements Processor |
||
| 13 | { |
||
| 14 | use Processor\Implementation, |
||
| 15 | Helper\GetByReference |
||
| 16 | { |
||
| 17 | Helper\GetByReference::withSourceAndTarget insteadof Processor\Implementation; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Apply processing to a single node |
||
| 22 | * |
||
| 23 | * @param Node $node |
||
| 24 | */ |
||
| 25 | public function applyToNode(Node $node) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Choose on of the cases |
||
| 36 | * |
||
| 37 | * @param string $ref Property name of source |
||
| 38 | * @param object $cases |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | protected function choose($ref, $cases) |
||
| 46 | } |
||
| 47 |