Cecil

Save extends AbstractStep

Save step.

This step is responsible for saving the rendered pages to the output directory. It iterates through the pages, checks if they have been rendered, and saves the output in the specified format. The saved files are logged, and the output directory is created if it does not exist. If the dry-run option is enabled, the step will not perform any file operations but will still log the intended actions.

Table of Contents

Properties

$builder  : Builder
$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
Process implementation.
cleanPath()  : string
Removes unnecessary directory separators.

Properties

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

cleanPath()

Removes unnecessary directory separators.

private cleanPath(string $pathname) : string
Parameters
$pathname : string
Return values
string
 
On this page

Search results