1 | <?php |
||
21 | class BlockDirective extends Directive implements DirectiveInterface |
||
22 | { |
||
23 | /** @var array orderd list of sub directives */ |
||
24 | private $directives = []; |
||
25 | |||
26 | /** |
||
27 | * Adds a Directive at the end of the list. |
||
28 | * |
||
29 | * @param DirectiveInterface $directive a directive to add |
||
30 | */ |
||
31 | 6 | public function add(DirectiveInterface $directive) |
|
37 | |||
38 | /** |
||
39 | * Confirms if the directive contains a specified directive. |
||
40 | * |
||
41 | * @param string $name the directive for which to check existence |
||
42 | * |
||
43 | * @return bool true if the sub-directive exists, false otherwise |
||
44 | */ |
||
45 | 1 | public function hasDirective($name) |
|
59 | |||
60 | /** |
||
61 | * Looks into sub directives to confirm if the actual contains a specified directive. |
||
62 | * |
||
63 | * @param string $name the directive for which to check existence |
||
64 | * @param bool $inSubDirective the actual state |
||
65 | * @param DirectiveInterface $directive the sub directive to look into |
||
66 | * |
||
67 | * @return bool true if the sub-directive exists, false otherwise |
||
68 | */ |
||
69 | 1 | private function hasInnerDirective($name, $inSubDirective, DirectiveInterface $directive) |
|
77 | |||
78 | /** |
||
79 | * Confirms if the directive is simple. |
||
80 | * |
||
81 | * Block directive can have sub directives |
||
82 | * |
||
83 | * @return bool true if the directive is simple, false otherwise |
||
84 | */ |
||
85 | 1 | public function isSimple() |
|
89 | } |
||
90 |