Toolkit

InstallCommands extends AbstractCommands
in package

Class ToolkitCommands.

Table of Contents

getConfigurationFile()  : string
Path to YAML configuration file containing command defaults.
getWorkingDir()  : string
Returns the current working directory.
initializeRuntimeConfiguration()  : mixed
Command initialization.
toolkitImportConfig()  : CollectionBuilder
Import config.
toolkitInstallClean()  : CollectionBuilder
Install a clean website.
toolkitInstallClone()  : CollectionBuilder
Install a clone website.
toolkitRunDeploy()  : CollectionBuilder
Run deployment sequence.
getBin()  : string
Validate and return the path to given bin.
getBinPath()  : string
Return the path to given bin.
getConfigValue()  : mixed
{@inheritdoc}
getNodeBin()  : string
Validate and return the path to given bin from node packages.
getNodeBinPath()  : string
Return the path to given bin from node packages.
isSimulating()  : bool
Check if current command is being executed with option simulate.
taskExecute()  : mixed
Execute a command.
taskProcess()  : Process|CollectionBuilder
Process the file.
taskReplaceBlock()  : ReplaceBlock|CollectionBuilder
Replace block in a file.

Methods

getConfigurationFile()

Path to YAML configuration file containing command defaults.

public getConfigurationFile() : string
Return values
string

getWorkingDir()

Returns the current working directory.

public getWorkingDir() : string
Return values
string

The current working directory.

initializeRuntimeConfiguration()

Command initialization.

public initializeRuntimeConfiguration() : mixed
Tags
hook

pre-command-event *

Return values
mixed

toolkitImportConfig()

Import config.

public toolkitImportConfig() : CollectionBuilder
Tags
command

toolkit:import-config

aliases

tk-ic

Return values
CollectionBuilder

Collection builder.

toolkitInstallClean()

Install a clean website.

public toolkitInstallClean([array<string|int, mixed> $options = ['config-file' => InputOption::VALUE_REQUIRED] ]) : CollectionBuilder
Parameters
$options : array<string|int, mixed> = ['config-file' => InputOption::VALUE_REQUIRED]

Command options.

Tags
command

toolkit:install-clean

option

config-file The path to the config file.

aliases

tk-iclean

Return values
CollectionBuilder

Collection builder.

toolkitInstallClone()

Install a clone website.

public toolkitInstallClone([array<string|int, mixed> $options = ['dumpfile' => InputOption::VALUE_REQUIRED] ]) : CollectionBuilder
Parameters
$options : array<string|int, mixed> = ['dumpfile' => InputOption::VALUE_REQUIRED]

Command options.

Tags
command

toolkit:install-clone

option

dumpfile The dump file name.

aliases

tk-iclone

Return values
CollectionBuilder

Collection builder.

toolkitRunDeploy()

Run deployment sequence.

public toolkitRunDeploy([array<string|int, mixed> $options = ['sequence-file' => InputOption::VALUE_REQUIRED, 'sequence-key' => InputOption::VALUE_REQUIRED, 'config-file' => InputOption::VALUE_REQUIRED] ]) : CollectionBuilder

This command will check for a file that holds the deployment sequence. If it is available it will run the commands defined in the yaml file under the selected key. If not we will run a standard set of deployment commands.

Parameters
$options : array<string|int, mixed> = ['sequence-file' => InputOption::VALUE_REQUIRED, 'sequence-key' => InputOption::VALUE_REQUIRED, 'config-file' => InputOption::VALUE_REQUIRED]

Command options.

Tags
command

toolkit:run-deploy

option

sequence-file The file that holds the deployment sequence.

option

sequence-key The key under which the commands are defined.

option

config-file The config file that triggers the config import.

Return values
CollectionBuilder

Collection builder.

getBin()

Validate and return the path to given bin.

protected getBin(string $name) : string
Parameters
$name : string

The bin to look for.

Tags
throws
TaskException
Return values
string

The bin path.

getBinPath()

Return the path to given bin.

protected getBinPath(string $name) : string
Parameters
$name : string
Return values
string

The path to given binary.

getConfigValue()

{@inheritdoc}

protected getConfigValue(mixed $key[, mixed $default = null ]) : mixed
Parameters
$key : mixed
$default : mixed = null
Return values
mixed

getNodeBin()

Validate and return the path to given bin from node packages.

protected getNodeBin(string $name) : string
Parameters
$name : string

The bin to look for.

Tags
throws
TaskException
Return values
string

The bin path.

getNodeBinPath()

Return the path to given bin from node packages.

protected getNodeBinPath(string $name) : string
Parameters
$name : string
Return values
string

The path to given binary.

isSimulating()

Check if current command is being executed with option simulate.

protected isSimulating() : bool
Return values
bool

True if using --simulate, false otherwise.

taskExecute()

Execute a command.

protected taskExecute(array<string|int, mixed> $tasks) : mixed
Parameters
$tasks : array<string|int, mixed>

An array with tasks to execute.

Return values
mixed

taskProcess()

Process the file.

protected taskProcess(string $source[, string $destination = '' ]) : Process|CollectionBuilder
Parameters
$source : string

The source file to process.

$destination : string = ''

The destination file.

Return values
Process|CollectionBuilder

taskReplaceBlock()

Replace block in a file.

protected taskReplaceBlock([string $filename = '' ]) : ReplaceBlock|CollectionBuilder
Parameters
$filename : string = ''

The file to process.

Return values
ReplaceBlock|CollectionBuilder

Search results