1 | <?php |
||
12 | class Asset implements ExtensionInterface |
||
13 | { |
||
14 | /** |
||
15 | * Instance of the current template. |
||
16 | * @var Template |
||
17 | */ |
||
18 | public $template; |
||
19 | |||
20 | /** |
||
21 | * Path to asset directory. |
||
22 | * @var string |
||
23 | */ |
||
24 | public $path; |
||
25 | |||
26 | /** |
||
27 | * Enables the filename method. |
||
28 | * @var boolean |
||
29 | */ |
||
30 | public $filenameMethod; |
||
31 | |||
32 | /** |
||
33 | * Enables hashing for last updated value in filename. |
||
34 | * @var boolean |
||
35 | */ |
||
36 | public $hashLastUpdatedValue; |
||
37 | |||
38 | /** |
||
39 | * Create new Asset instance. |
||
40 | * @param string $path |
||
41 | * @param boolean $filenameMethod |
||
42 | * @param boolean $hashLastUpdatedValue |
||
43 | */ |
||
44 | 16 | public function __construct($path, $filenameMethod = false, $hashLastUpdatedValue = false) |
|
50 | |||
51 | /** |
||
52 | * Register extension function. |
||
53 | * @param Engine $engine |
||
54 | * @return null |
||
55 | */ |
||
56 | 4 | public function register(Engine $engine) |
|
60 | |||
61 | /** |
||
62 | * Create "cache busted" asset URL. |
||
63 | * @param string $url |
||
64 | * @return string |
||
65 | */ |
||
66 | 10 | public function cachedAssetUrl($url) |
|
97 | } |
||
98 |