1 | <?php |
||
11 | class Htaccess |
||
12 | { |
||
13 | /** |
||
14 | * @var Filesystem |
||
15 | */ |
||
16 | private $fs; |
||
17 | |||
18 | /** |
||
19 | * @var Parser |
||
20 | */ |
||
21 | private $parser; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $contents; |
||
27 | |||
28 | /** |
||
29 | * Htaccess constructor. |
||
30 | * |
||
31 | * @param string $path |
||
32 | * |
||
33 | * @throws ConfigurationException |
||
34 | */ |
||
35 | function __construct(string $path) { |
||
46 | |||
47 | /** |
||
48 | * Parse the modified .htaccess |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function parse() : string { |
||
55 | |||
56 | /** |
||
57 | * Get or create the headers block |
||
58 | * |
||
59 | * @return Block |
||
60 | */ |
||
61 | public function &getHeaderBlock() : Block { |
||
83 | |||
84 | /** |
||
85 | * Get or create a page block within the headers block |
||
86 | * |
||
87 | * @param Page $page |
||
88 | * |
||
89 | * @return mixed|null|Block |
||
90 | */ |
||
91 | public function &getPageBlock(Page $page) { |
||
117 | |||
118 | public function clearPageBlocks() { |
||
128 | } |
||
129 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.