Toolkit

Process extends BaseTask
in package
implements BuilderAwareInterface Uses BuilderAwareTrait

Process a source file to its destination replacing tokens.

<?php
$this->taskProcess('behat.yml')->run();
$this->taskProcess('behat.yml.dist', 'behat.yml')->run();
?>

Interfaces, Classes, Traits and Enums

BuilderAwareInterface

Table of Contents

$content  : string
The content from the source.
$destination  : string
Destination file.
$source  : string
Source file.
__construct()  : mixed
Constructs a new Process task.
run()  : Result
Execute the task.
extractTokens()  : array<string|int, mixed>
Return the tokens found in the content.
loadContent()  : mixed
Get the content from the source.
processTokens()  : array<string|int, mixed>|array<string|int, string>
Process the content by replacing the tokens with the values in config.

Properties

$content

The content from the source.

protected string $content

$destination

Destination file.

protected string $destination

$source

Source file.

protected string $source

Methods

__construct()

Constructs a new Process task.

public __construct(string $source[, string $destination = '' ]) : mixed
Parameters
$source : string
$destination : string = ''
Return values
mixed

run()

Execute the task.

public run() : Result
Return values
Result

The result of the task.

extractTokens()

Return the tokens found in the content.

protected extractTokens() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array with the tokens found in the content.

loadContent()

Get the content from the source.

protected loadContent() : mixed
Return values
mixed

processTokens()

Process the content by replacing the tokens with the values in config.

protected processTokens() : array<string|int, mixed>|array<string|int, string>
Return values
array<string|int, mixed>|array<string|int, string>

The tokens.

Search results