1 | <?php |
||
8 | class MixExtension extends \Twig_Extension |
||
|
|||
9 | { |
||
10 | const MANIFEST = 'mix-manifest.json'; |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $webDir; |
||
15 | |||
16 | /** |
||
17 | * MixExtension constructor. |
||
18 | * |
||
19 | * @param string $webDir |
||
20 | */ |
||
21 | public function __construct($webDir) |
||
25 | |||
26 | /** |
||
27 | * @return \Twig_SimpleFunction[] |
||
28 | */ |
||
29 | public function getFunctions() |
||
35 | |||
36 | /** |
||
37 | * Get the mix file from the manifest |
||
38 | * |
||
39 | * @param string $asset The needed asset |
||
40 | * |
||
41 | * @throws \Exception |
||
42 | * @return string |
||
43 | */ |
||
44 | public function mix($asset) |
||
62 | |||
63 | /** |
||
64 | * Returns the name of the extension. |
||
65 | * |
||
66 | * @return string The extension name |
||
67 | */ |
||
68 | public function getName() |
||
72 | |||
73 | /** |
||
74 | * Read the manifest file if exists |
||
75 | * |
||
76 | * @return array |
||
77 | * @throws \Exception |
||
78 | */ |
||
79 | private function readManifest() |
||
98 | } |
||
99 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.