class Assets

A factory class for creating frontend asset compilers.

Properties

array $sources
protected string $name
protected Filesystem $assetsDir
protected string $cacheDir
protected array $lessImportDirs

Methods

__construct(string $name, Filesystem $assetsDir, string $cacheDir = null, array $lessImportDirs = null)

No description

js($sources)

No description

css($callback)

No description

localeJs($callback)

No description

localeCss($callback)

No description

makeJs()

No description

makeCss()

No description

makeLocaleJs(string $locale)

No description

makeLocaleCss(string $locale)

No description

makeJsCompiler(string $filename)

No description

makeLessCompiler(string $filename)

No description

string
getName()

No description

setName(string $name)

No description

Filesystem
getAssetsDir()

No description

setAssetsDir(Filesystem $assetsDir)

No description

string|null
getCacheDir()

No description

setCacheDir(string|null $cacheDir)

No description

array
getLessImportDirs()

No description

setLessImportDirs(array $lessImportDirs)

No description

Details

__construct(string $name, Filesystem $assetsDir, string $cacheDir = null, array $lessImportDirs = null)

Parameters

string $name
Filesystem $assetsDir
string $cacheDir
array $lessImportDirs

js($sources)

Parameters

$sources

css($callback)

Parameters

$callback

localeJs($callback)

Parameters

$callback

localeCss($callback)

Parameters

$callback

JsCompiler makeJs()

Return Value

JsCompiler

LessCompiler makeCss()

Return Value

LessCompiler

JsCompiler makeLocaleJs(string $locale)

Parameters

string $locale

Return Value

JsCompiler

LessCompiler makeLocaleCss(string $locale)

Parameters

string $locale

Return Value

LessCompiler

protected makeJsCompiler(string $filename)

Parameters

string $filename

protected LessCompiler makeLessCompiler(string $filename)

Parameters

string $filename

Return Value

LessCompiler

string getName()

Return Value

string

setName(string $name)

Parameters

string $name

Filesystem getAssetsDir()

Return Value

Filesystem

setAssetsDir(Filesystem $assetsDir)

Parameters

Filesystem $assetsDir

string|null getCacheDir()

Return Value

string|null

setCacheDir(string|null $cacheDir)

Parameters

string|null $cacheDir

array getLessImportDirs()

Return Value

array

setLessImportDirs(array $lessImportDirs)

Parameters

array $lessImportDirs