| 1 | <?php |
||
| 11 | abstract class AbstractConfig |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var null|AbstractConfig |
||
| 15 | */ |
||
| 16 | protected $___parent; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var null|string |
||
| 20 | */ |
||
| 21 | protected $___key; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * AbstractConfig constructor. |
||
| 25 | * |
||
| 26 | * @param AbstractConfig|null $parent |
||
| 27 | * @param string|null $key |
||
| 28 | */ |
||
| 29 | public function __construct(AbstractConfig $parent = null, string $key = null) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $key |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | public function exists(string $key): bool |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $key |
||
| 46 | * @return AbstractConfig |
||
| 47 | * @throws MissingConfigException |
||
| 48 | */ |
||
| 49 | public function depend(string $key): AbstractConfig |
||
| 64 | } |