File code/addon/Resources.php
class Lia\Addon\Resources
A component for managing multiple css & js files for a single request.
Constants
Properties
-
public $fqn = 'lia:server.resources';
-
public $files = [];
-
public $urls = [];
-
public $sorter = [];
-
public $minify = true;
to minify css & js or not -
public $useCache = true;
Whether to enable cache or not.
Methods
-
public function __construct($lia=null, $namenull)
-
public function onPackageReady($package)
-
protected function cleanExt($ext)
-
protected function cacheMapName($ext)
-
public function setSorter($ext, $sorter)
-
public function addFile($file)
-
public function addUrl($url)
-
public function getHtml()
-
public function routePatternToRes($route,$response=null)
Returns routes for compiled resource files & later processes said routes -
public function getFileTag($ext)
-
public function getUrlTag($ext)
-
public function getSortedFiles($ext)
-
public function concatenateFiles($ext)
-
public function concatenateFileNames($ext)
-
public function compileFilesToCache($ext)
-
public function getCompiledFilesUrl($ext)
-
public function minifyFiles(string $fileContent, string $ext)