1 | <?php |
||
15 | final class ScriptHandler extends AbstractLinkHandler |
||
16 | { |
||
17 | /** |
||
18 | * @var HeadScript |
||
19 | */ |
||
20 | private $headScript; |
||
21 | |||
22 | /** |
||
23 | * @var OptionsInterface |
||
24 | */ |
||
25 | private $options; |
||
26 | |||
27 | /** |
||
28 | * ScriptHandler constructor. |
||
29 | * |
||
30 | * @param HeadScript $headScript |
||
31 | * @param OptionsInterface $options |
||
32 | */ |
||
33 | 6 | public function __construct(HeadScript $headScript, OptionsInterface $options) |
|
38 | |||
39 | /** |
||
40 | * @param MvcEvent $event |
||
41 | */ |
||
42 | 5 | public function __invoke(MvcEvent $event) |
|
81 | |||
82 | /** |
||
83 | * Whether the link is valid to be injected in headers |
||
84 | * |
||
85 | * @param array $attributes |
||
86 | * @return bool |
||
87 | */ |
||
88 | 3 | private function canInjectLink(array $attributes): bool |
|
92 | } |
||
93 |