1 | <?php |
||
15 | final class StylesheetHandler extends AbstractLinkHandler |
||
16 | { |
||
17 | const TYPE_STYLESHEET = 'stylesheet'; |
||
18 | /** |
||
19 | * @var HeadLink |
||
20 | */ |
||
21 | private $headLink; |
||
22 | |||
23 | /** |
||
24 | * @var OptionsInterface |
||
25 | */ |
||
26 | private $options; |
||
27 | |||
28 | /** |
||
29 | * StylesheetHandler constructor. |
||
30 | * |
||
31 | * @param HeadLink $headLink |
||
32 | * @param OptionsInterface $options |
||
33 | */ |
||
34 | 8 | public function __construct(HeadLink $headLink, OptionsInterface $options) |
|
39 | |||
40 | /** |
||
41 | * @param MvcEvent $event |
||
42 | */ |
||
43 | 7 | public function __invoke(MvcEvent $event) |
|
85 | |||
86 | /** |
||
87 | * Whether the link is valid to be injected in headers |
||
88 | * |
||
89 | * @param array $attributes |
||
90 | * @return bool |
||
91 | */ |
||
92 | 5 | private function canInjectLink(array $attributes): bool |
|
100 | } |
||
101 |