1 | <?php |
||
9 | class Node implements INode { |
||
10 | /** |
||
11 | * @var IConfigSchema |
||
12 | */ |
||
13 | protected $schema; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $key; |
||
19 | |||
20 | /** |
||
21 | * Node constructor. |
||
22 | * |
||
23 | * @param IConfigSchema $schema |
||
24 | * @param string $key |
||
25 | */ |
||
26 | public function __construct(IConfigSchema $schema, $key) { |
||
30 | |||
31 | /** |
||
32 | * @param string $key |
||
33 | * @param string $message |
||
34 | * |
||
35 | * @return IValueNode |
||
36 | */ |
||
37 | public function hasValue($key, $message = null) { |
||
40 | |||
41 | /** |
||
42 | * @param string $key |
||
43 | * @param string $message |
||
44 | * |
||
45 | * @return IStringNode |
||
46 | */ |
||
47 | public function hasString($key, $message = null) { |
||
50 | |||
51 | /** |
||
52 | * @param string $key |
||
53 | * @param string $message |
||
54 | * |
||
55 | * @return INumericNode |
||
56 | */ |
||
57 | public function hasNumber($key, $message = null) { |
||
60 | |||
61 | /** |
||
62 | * @param string $key |
||
63 | * @param string $message |
||
64 | * |
||
65 | * @return IBooleanNode |
||
66 | */ |
||
67 | public function hasBoolean($key, $message = null) { |
||
70 | |||
71 | /** |
||
72 | * @param string $key |
||
73 | * @param string $message |
||
74 | * |
||
75 | * @return IArrayNode |
||
76 | */ |
||
77 | public function hasArray($key, $message = null) { |
||
80 | |||
81 | /** |
||
82 | * @param string $key |
||
83 | * @param string $message |
||
84 | * |
||
85 | * @return IStringNode |
||
86 | */ |
||
87 | public function hasArrayKeys($key, $message = null) { |
||
90 | |||
91 | /** |
||
92 | * @return null |
||
93 | */ |
||
94 | public function assert() { |
||
97 | |||
98 | /** |
||
99 | * @return IValidationResult |
||
100 | */ |
||
101 | public function check() { |
||
104 | |||
105 | /** |
||
106 | * @param IConstraint $constraint |
||
107 | * |
||
108 | * @return $this |
||
109 | */ |
||
110 | public function addConstraint(IConstraint $constraint) { |
||
115 | |||
116 | /** |
||
117 | * @param IConstraint[] $constraints |
||
118 | * |
||
119 | * @return $this |
||
120 | */ |
||
121 | public function addConstraints(array $constraints) { |
||
126 | } |
||
127 |