| 1 | <?php |
||
| 13 | abstract class Combinator extends Variable { |
||
| 14 | /** |
||
| 15 | * @var Variable |
||
| 16 | */ |
||
| 17 | private $left; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Variable |
||
| 21 | */ |
||
| 22 | private $right; |
||
| 23 | |||
| 24 | 319 | public function __construct($name, Variable $left, Variable $right) { |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Get an id for this combinator. |
||
| 32 | * |
||
| 33 | * This must return a string without whitespaces. |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | abstract public function id(); |
||
| 38 | |||
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritdocs |
||
| 42 | */ |
||
| 43 | 98 | public function meaning() { |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return Variable |
||
| 50 | */ |
||
| 51 | 119 | public function left() { |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return Variable |
||
| 57 | */ |
||
| 58 | 119 | public function right() { |
|
| 61 | } |
||
| 62 |