1 | <?php |
||
33 | class InclusionDirective extends BlockDirective implements DirectiveInterface |
||
34 | { |
||
35 | /** @var \WebHelper\Parser\Parser the parser instance */ |
||
36 | private $parser; |
||
37 | |||
38 | /** @var array file list pointed with that directive */ |
||
39 | private $files = []; |
||
40 | |||
41 | /** |
||
42 | * Specific constructor for inclusion directives. |
||
43 | * |
||
44 | * @param string $name the name of the key/context |
||
45 | * @param string $value the value of the key/context |
||
46 | * @param \WebHelper\Parser\Parser $parser the parser instance |
||
47 | */ |
||
48 | 4 | public function __construct($name, $value, Parser $parser) |
|
55 | |||
56 | /** |
||
57 | * Gets the detected files of the directive. |
||
58 | * |
||
59 | * @return array detected files |
||
60 | */ |
||
61 | 3 | public function getFiles() |
|
65 | |||
66 | /** |
||
67 | * Detects and memoizes the included files. |
||
68 | */ |
||
69 | 4 | public function setFiles() |
|
85 | |||
86 | /** |
||
87 | * Fills the block directives by compiling the memoized files. |
||
88 | */ |
||
89 | 4 | public function compileFiles() |
|
98 | |||
99 | /** |
||
100 | * Dumps the directive respecting a server syntax. |
||
101 | * |
||
102 | * @param ServerInterface $server a server instance |
||
103 | * @param int $spaces the indentation spaces |
||
104 | * |
||
105 | * @return string the dumped directive |
||
106 | */ |
||
107 | 1 | public function dump(ServerInterface $server, $spaces = 0) |
|
111 | } |
||
112 |