1 | <?php |
||
11 | abstract class AbstractConfig |
||
12 | { |
||
13 | /** |
||
14 | * @var object |
||
15 | */ |
||
16 | protected $___owner; |
||
17 | |||
18 | /** |
||
19 | * @var null|AbstractConfig |
||
20 | */ |
||
21 | protected $___parent; |
||
22 | |||
23 | /** |
||
24 | * @var null|string |
||
25 | */ |
||
26 | protected $___key; |
||
27 | |||
28 | /** |
||
29 | * AbstractConfig constructor. |
||
30 | * |
||
31 | * @param object $owner |
||
32 | * @param AbstractConfig|null $parent |
||
33 | * @param string|null $key |
||
34 | */ |
||
35 | public function __construct($owner, AbstractConfig $parent = null, string $key = null) |
||
41 | |||
42 | /** |
||
43 | * @param string $key |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function exists(string $key): bool |
||
50 | |||
51 | /** |
||
52 | * @param string $key |
||
53 | * @return AbstractConfig |
||
54 | * @throws MissingConfigException |
||
55 | */ |
||
56 | public function depend(string $key): AbstractConfig |
||
71 | } |