1 | <?php |
||
16 | abstract class BrowserAsset extends Asset |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var string $source |
||
21 | */ |
||
22 | private $source; |
||
23 | |||
24 | /** |
||
25 | * @var array $dependencies |
||
26 | */ |
||
27 | private $dependencies; |
||
28 | |||
29 | /** |
||
30 | * @var string $version |
||
31 | */ |
||
32 | private $version; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Asset constructor. |
||
37 | * |
||
38 | * @param string $type |
||
39 | * @param string $handle |
||
40 | * @param string $source |
||
41 | * @param array $dependencies |
||
42 | * @param DomainInterface $domain |
||
43 | * @throws InvalidDataTypeException |
||
44 | */ |
||
45 | public function __construct($type, $handle, $source, array $dependencies, DomainInterface $domain) |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @since $VID:$ |
||
55 | */ |
||
56 | abstract public function enqueueAsset(); |
||
57 | |||
58 | |||
59 | /** |
||
60 | * @return array |
||
61 | */ |
||
62 | public function dependencies() |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @param array $dependencies |
||
70 | */ |
||
71 | private function setDependencies(array $dependencies) |
||
75 | |||
76 | |||
77 | /** |
||
78 | * @since $VID:$ |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasDependencies() |
||
85 | |||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function source() |
||
94 | |||
95 | |||
96 | /** |
||
97 | * @param string $source |
||
98 | * @throws InvalidDataTypeException |
||
99 | */ |
||
100 | private function setSource($source) |
||
111 | |||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | * @throws InvalidDataTypeException |
||
116 | */ |
||
117 | public function version() |
||
132 | |||
133 | |||
134 | /** |
||
135 | * @param string $version |
||
136 | * @return BrowserAsset |
||
137 | * @throws InvalidDataTypeException |
||
138 | */ |
||
139 | public function setVersion($version = EVENT_ESPRESSO_VERSION) |
||
151 | } |
||
152 |