Cecil

Save extends AbstractStep

Save assets step.

This step is responsible for saving assets to the output directory. It copies files from the cache to the output directory, ensuring that assets are available for the final build. If the cache is disabled, it clears the cache directory before processing assets.

Table of Contents

Properties

$builder  : Builder
$cache  : Cache
$cacheKey  : string
$canProcess  : bool
$config  : Config
$options  : Builder::OPTIONS
Configuration options for the step.

Methods

__construct()  : mixed
StepInterface constructor.
canProcess()  : bool
Method to know if the step can be processed.
getName()  : string
Returns the step name.
init()  : void
This method is called before the step is processed to initialize the step with necessary options and to determine if it can be executed.
process()  : void
{@inheritdoc} Note: a file from `static/` with the same name will NOT be overridden.
clearCacheIfDisabled()  : void
Deletes cache directory, if cache is disabled.

Properties

$cacheKey

protected string $cacheKey

$options

Configuration options for the step.

protected Builder::OPTIONS $options

Methods

canProcess()

Method to know if the step can be processed.

public canProcess() : bool

If init() is used, true by default.

Return values
bool

getName()

Returns the step name.

public getName() : string
Return values
string

init()

This method is called before the step is processed to initialize the step with necessary options and to determine if it can be executed.

public init(array<string|int, mixed> $options) : void
Parameters
$options : array<string|int, mixed>

process()

{@inheritdoc} Note: a file from `static/` with the same name will NOT be overridden.

public process() : void
Tags
throws
RuntimeException

clearCacheIfDisabled()

Deletes cache directory, if cache is disabled.

private clearCacheIfDisabled() : void
 
On this page

Search results