1 | <?php |
||
21 | class Link extends HeadAbstract |
||
22 | { |
||
23 | /** |
||
24 | * options of the link |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | |||
29 | protected static $_optionArray = |
||
30 | [ |
||
31 | 'directory' => 'cache/styles', |
||
32 | 'extension' => 'css', |
||
33 | 'attribute' => 'href', |
||
34 | 'lifetime' => 3600 |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * rewrite of the link |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | |||
43 | protected static $_rewriteArray = []; |
||
44 | |||
45 | /** |
||
46 | * append link file |
||
47 | * |
||
48 | * @since 3.0.0 |
||
49 | * |
||
50 | * @param string|array $reference |
||
51 | * |
||
52 | * @return self |
||
53 | */ |
||
54 | |||
55 | 1 | public function appendFile($reference = null) : self |
|
67 | |||
68 | /** |
||
69 | * prepend link file |
||
70 | * |
||
71 | * @since 3.0.0 |
||
72 | * |
||
73 | * @param string|array $reference |
||
74 | * |
||
75 | * @return self |
||
76 | */ |
||
77 | |||
78 | 1 | public function prependFile($reference = null) : self |
|
90 | |||
91 | /** |
||
92 | * remove link file |
||
93 | * |
||
94 | * @since 3.0.0 |
||
95 | * |
||
96 | * @param string|array $reference |
||
97 | * |
||
98 | * @return self |
||
99 | */ |
||
100 | |||
101 | 1 | public function removeFile($reference = null) : self |
|
109 | |||
110 | /** |
||
111 | * rewrite the link |
||
112 | * |
||
113 | * @since 3.0.0 |
||
114 | * |
||
115 | * @param array $pathArray |
||
116 | * |
||
117 | * @return self |
||
118 | */ |
||
119 | |||
120 | 1 | public function rewrite(array $pathArray = []) : self |
|
127 | |||
128 | /** |
||
129 | * concat the link |
||
130 | * |
||
131 | * @since 3.0.0 |
||
132 | * |
||
133 | * @param array $optionArray |
||
134 | * |
||
135 | * @return self |
||
136 | */ |
||
137 | |||
138 | 1 | public function concat(array $optionArray = []) : self |
|
152 | |||
153 | /** |
||
154 | * render the link |
||
155 | * |
||
156 | * @since 3.0.0 |
||
157 | * |
||
158 | * @return string|null |
||
159 | */ |
||
160 | |||
161 | 7 | public function render() : ?string |
|
188 | |||
189 | /** |
||
190 | * get the rewrite array |
||
191 | * |
||
192 | * @since 3.0.0 |
||
193 | * |
||
194 | * @return array |
||
195 | */ |
||
196 | |||
197 | 2 | protected function _getRewriteArray() : array |
|
201 | |||
202 | /** |
||
203 | * set the rewrite array |
||
204 | * |
||
205 | * @since 3.0.0 |
||
206 | * |
||
207 | * @param array $rewriteArray |
||
208 | */ |
||
209 | |||
210 | 2 | protected function _setRewriteArray(array $rewriteArray = []) : void |
|
214 | } |
||
215 |