class Assets

A factory class for creating frontend asset compilers.

Properties

array $sources
protected string $name
protected Cloud $assetsDir
protected string $cacheDir
protected array $lessImportDirs
protected array $lessImportOverrides
protected array $fileSourceOverrides
protected array $customFunctions

Methods

__construct(string $name, Cloud $assetsDir, string $cacheDir = null, array $lessImportDirs = null, array $customFunctions = [])

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

Cloud
getAssetsDir()

No description

setAssetsDir(Cloud $assetsDir)

No description

string|null
getCacheDir()

No description

setCacheDir(string|null $cacheDir)

No description

array
getLessImportDirs()

No description

setLessImportDirs(array $lessImportDirs)

No description

addLessImportOverrides(array $lessImportOverrides)

No description

addFileSourceOverrides(array $fileSourceOverrides)

No description

Details

__construct(string $name, Cloud $assetsDir, string $cacheDir = null, array $lessImportDirs = null, array $customFunctions = [])

Parameters

string $name
Cloud $assetsDir
string $cacheDir
array $lessImportDirs
array $customFunctions

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

Cloud getAssetsDir()

Return Value

Cloud

setAssetsDir(Cloud $assetsDir)

Parameters

Cloud $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

addLessImportOverrides(array $lessImportOverrides)

Parameters

array $lessImportOverrides

addFileSourceOverrides(array $fileSourceOverrides)

Parameters

array $fileSourceOverrides