| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare( strict_types=1 ); |
||
| 8 | abstract class Element { |
||
| 9 | /** @var Controller */ |
||
| 10 | protected $controller; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param Controller $controller |
||
| 14 | */ |
||
| 15 | public function __construct( Controller $controller ) { |
||
| 16 | $this->controller = $controller; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Return a regex for matching the name of the element |
||
| 21 | * |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | abstract public function getRegex() : string; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get a regex matching any element in the given array |
||
| 28 | * |
||
| 29 | * @param self[] $elements |
||
| 30 | * @return string |
||
| 31 | * @todo Is this the right place? |
||
| 32 | */ |
||
| 33 | public static function regexFromArray( array $elements ) : string { |
||
| 39 | } |
||
| 40 | } |
||
| 41 |