1 | <?php |
||
17 | abstract class BrowserAsset extends Asset |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var string $source |
||
22 | */ |
||
23 | private $source; |
||
24 | |||
25 | /** |
||
26 | * @var array $dependencies |
||
27 | */ |
||
28 | private $dependencies; |
||
29 | |||
30 | /** |
||
31 | * @var string $version |
||
32 | */ |
||
33 | private $version; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * Asset constructor. |
||
38 | * |
||
39 | * @param string $type |
||
40 | * @param string $handle |
||
41 | * @param string $source |
||
42 | * @param array $dependencies |
||
43 | * @param DomainInterface $domain |
||
44 | * @throws InvalidDataTypeException |
||
45 | */ |
||
46 | public function __construct($type, $handle, $source, array $dependencies, DomainInterface $domain) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @since 4.9.62.p |
||
56 | */ |
||
57 | abstract public function enqueueAsset(); |
||
58 | |||
59 | |||
60 | /** |
||
61 | * @return array |
||
62 | */ |
||
63 | public function dependencies() |
||
67 | |||
68 | |||
69 | /** |
||
70 | * @param array $dependencies |
||
71 | */ |
||
72 | private function setDependencies(array $dependencies) |
||
76 | |||
77 | |||
78 | /** |
||
79 | * @since 4.9.62.p |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function hasDependencies() |
||
86 | |||
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | public function source() |
||
95 | |||
96 | |||
97 | /** |
||
98 | * @param string $source |
||
99 | * @throws InvalidDataTypeException |
||
100 | */ |
||
101 | private function setSource($source) |
||
112 | |||
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | * @throws InvalidDataTypeException |
||
117 | * @throws DomainException |
||
118 | */ |
||
119 | public function version() |
||
128 | |||
129 | |||
130 | /** |
||
131 | * @param string $version |
||
132 | * @return BrowserAsset |
||
133 | * @throws InvalidDataTypeException |
||
134 | * @throws DomainException |
||
135 | */ |
||
136 | public function setVersion($version = '') |
||
151 | |||
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | public function isBuiltDistributionSource() { |
||
160 | } |
||
161 |