Cecil

Copy extends AbstractStep

Copy static files step.

This step is responsible for copying static files from the source directories (like static/ and assets/) to the output directory. It handles both files and directories, allowing for exclusions based on the configuration. It also supports copying files from theme-specific directories if themes are configured. The step can be run in a dry-run mode where no actual file operations are performed, but the intended actions are still logged.

Table of Contents

Properties

$builder  : Builder
$canProcess  : bool
$config  : Config
$count  : mixed
$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.
copy()  : void
Copying a file or files in a directory from $from (if exists) to $to (relative to output path).

Properties

$count

protected mixed $count = 0

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

Process implementation.

public process() : void

copy()

Copying a file or files in a directory from $from (if exists) to $to (relative to output path).

protected copy(string $from[, string|null $to = null ][, array<string|int, mixed>|null $exclude = null ]) : void

Exclude files or directories with $exclude array.

Parameters
$from : string
$to : string|null = null
$exclude : array<string|int, mixed>|null = null
 
On this page

Search results