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();
?>
Table of Contents
Interfaces
- BuilderAwareInterface
Properties
- $content : string
- The content from the source.
- $destination : string
- Destination file.
- $source : string
- Source file.
Methods
- __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
-
The source file.
- $destination : string = ''
-
The destination file, if empty assumes the $source as destination.
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
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.