class JsCompiler extends RevisionCompiler

Constants

EMPTY_REVISION

Properties

protected Cloud $assetsDir from RevisionCompiler
protected VersionerInterface $versioner from RevisionCompiler
protected string $filename from RevisionCompiler
protected callable[] $sourcesCallbacks from RevisionCompiler

Methods

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

Details

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

Parameters

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

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