Documentation

CiviEnvBuilder
in package

Class CiviEnvBuilder

Provides a fluent interface for tracking a set of steps. By computing and storing a signature for the list steps, we can determine whether to (a) do nothing with the list or (b) reapply all the steps.

Table of Contents

Properties

$name  : mixed
$steps  : mixed
$targetSignature  : string|null

Methods

__construct()  : mixed
addStep()  : mixed
apply()  : CiviEnvBuilder
Determine if there's been a change in the preferred configuration.
callback()  : mixed
coreSchema()  : CiviEnvBuilder
Generate the core SQL tables.
install()  : CiviEnvBuilder
Require that an extension be installed.
installMe()  : CiviEnvBuilder
Require an extension be installed (identified by its directory).
sql()  : mixed
sqlFile()  : mixed
uninstall()  : CiviEnvBuilder
Require an extension be uninstalled.
uninstallMe()  : CiviEnvBuilder
Require an extension be uninstalled (identified by its directory).
assertValid()  : mixed
getSavedSignature()  : string
getTargetSignature()  : string
setSavedSignature()  : mixed
whoAmI()  : null

Properties

$targetSignature

private string|null $targetSignature = NULL

A digest of the values in $steps.

Methods

__construct()

public __construct([string $name = 'CiviEnvBuilder' ]) : mixed
Parameters
$name : string = 'CiviEnvBuilder'

apply()

Determine if there's been a change in the preferred configuration.

public apply([bool $force = FALSE ]) : CiviEnvBuilder

If the preferred-configuration matches the last test, keep it. Otherwise, destroy and recreate.

Parameters
$force : bool = FALSE

Forcibly execute the build, even if the configuration hasn't changed. This will slow-down the tests, but it may be appropriate for some very sloppy tests.

Return values
CiviEnvBuilder

callback()

public callback(mixed $callback[, mixed $signature = NULL ]) : mixed
Parameters
$callback : mixed
$signature : mixed = NULL

install()

Require that an extension be installed.

public install(string|array<string|int, mixed> $names) : CiviEnvBuilder
Parameters
$names : string|array<string|int, mixed>

One or more extension names. You may use a wildcard '*'.

Return values
CiviEnvBuilder

sqlFile()

public sqlFile(mixed $file) : mixed
Parameters
$file : mixed

uninstall()

Require an extension be uninstalled.

public uninstall(string|array<string|int, mixed> $names) : CiviEnvBuilder
Parameters
$names : string|array<string|int, mixed>

One or more extension names. You may use a wildcard '*'.

Return values
CiviEnvBuilder

getSavedSignature()

protected getSavedSignature() : string
Return values
string

getTargetSignature()

protected getTargetSignature() : string
Return values
string

setSavedSignature()

protected setSavedSignature(mixed $newSignature) : mixed
Parameters
$newSignature : mixed

        
On this page

Search results