class LessCompiler extends RevisionCompiler

Constants

EMPTY_REVISION

Properties

protected Filesystem $assetsDir from RevisionCompiler
protected VersionerInterface $versioner from RevisionCompiler
protected string $filename from RevisionCompiler
protected callable[] $sourcesCallbacks from RevisionCompiler
protected string $cacheDir
protected array $importDirs
protected array $customFunctions
protected Collection $lessImportOverrides
protected Collection $fileSourceOverrides

Methods

__construct(Filesystem $assetsDir, string $filename, VersionerInterface $versioner = null)

No description

string
getFilename()

No description

setFilename(string $filename)

No description

commit(bool $force = false)

No description

addSources(callable $callback)

No description

array
getSources()

No description

string|null
getUrl()

No description

bool
save(string $file, array $sources)

No description

string
compile(array $sources)

No description

string
format(string $string)

No description

string
calculateRevision(array $sources)

No description

array|null
getCacheDifferentiator()

No description

flush()

No description

delete(string $file)

No description

string
getCacheDir()

No description

setCacheDir(string $cacheDir)

No description

array
getImportDirs()

No description

setImportDirs(array $importDirs)

No description

setLessImportOverrides(array $lessImportOverrides)

No description

setFileSourceOverrides(array $fileSourceOverrides)

No description

setCustomFunctions(array $customFunctions)

No description

array
overrideSources(array $sources)

No description

callable
overrideImports(array $sources)

No description

Details

__construct(Filesystem $assetsDir, string $filename, VersionerInterface $versioner = null)

Parameters

Filesystem $assetsDir
string $filename
VersionerInterface $versioner <p>@deprecated nullable will be removed at v2.0</p>

string getFilename()

Return Value

string

setFilename(string $filename)

Parameters

string $filename

commit(bool $force = false)

Parameters

bool $force

addSources(callable $callback)

Parameters

callable $callback

protected array getSources()

Return Value

array

string|null getUrl()

Return Value

string|null

protected bool save(string $file, array $sources)

Parameters

string $file
array $sources

Return Value

bool <p>true if the file was written, false if there was nothing to write</p>

protected string compile(array $sources)

Parameters

array $sources

Return Value

string

Exceptions

Less_Exception_Parser

protected string format(string $string)

Parameters

string $string

Return Value

string

protected string calculateRevision(array $sources)

Parameters

array $sources

Return Value

string

protected array|null getCacheDifferentiator()

Return Value

array|null

protected delete(string $file)

Parameters

string $file

string getCacheDir()

Return Value

string

setCacheDir(string $cacheDir)

Parameters

string $cacheDir

array getImportDirs()

Return Value

array

setImportDirs(array $importDirs)

Parameters

array $importDirs

setLessImportOverrides(array $lessImportOverrides)

Parameters

array $lessImportOverrides

setFileSourceOverrides(array $fileSourceOverrides)

Parameters

array $fileSourceOverrides

setCustomFunctions(array $customFunctions)

Parameters

array $customFunctions

protected array overrideSources(array $sources)

Parameters

array $sources

Return Value

array

protected callable overrideImports(array $sources)

Parameters

array $sources

Return Value

callable