class ProvisioningPlan

Properties

array $plan

The raw provisioning plan.

array $parsed

The parsed provisioning plan.

Methods

__construct(string $master, array $plan, array $defaults = [])

Create a new provisioning plan instance.

get(string $master)

Get the current provisioning plan.

array
applyDefaultOptions(array $plan, array $defaults = [])

Apply the default supervisor options to each environment.

array
environments()

Get all of the defined environments for the provisioning plan.

bool
hasEnvironment(string $environment)

Determine if the provisioning plan has a given environment.

void
deploy(string $environment)

Deploy a provisioning plan to the current machine.

void
add(SupervisorOptions $options)

Add a supervisor with the given options.

optionsFor(string $environment, string $supervisor)

Get the SupervisorOptions for a given environment and supervisor.

array
toSupervisorOptions()

Convert the provisioning plan into an array of SupervisorOptions.

convert(string $supervisor, array $options)

Convert the given array of options into a SupervisorOptions instance.

Details

at line 31
__construct(string $master, array $plan, array $defaults = [])

Create a new provisioning plan instance.

Parameters

string $master

the master supervisor's name

array $plan
array $defaults

at line 43
static ProvisioningPlan get(string $master)

Get the current provisioning plan.

Parameters

string $master

Return Value

ProvisioningPlan

at line 51
protected array applyDefaultOptions(array $plan, array $defaults = [])

Apply the default supervisor options to each environment.

Parameters

array $plan
array $defaults

Return Value

array

at line 61
array environments()

Get all of the defined environments for the provisioning plan.

Return Value

array

at line 69
bool hasEnvironment(string $environment)

Determine if the provisioning plan has a given environment.

Parameters

string $environment

Return Value

bool

at line 77
void deploy(string $environment)

Deploy a provisioning plan to the current machine.

Parameters

string $environment

Return Value

void

at line 99
protected void add(SupervisorOptions $options)

Add a supervisor with the given options.

Parameters

SupervisorOptions $options

Return Value

void

at line 111
SupervisorOptions|null optionsFor(string $environment, string $supervisor)

Get the SupervisorOptions for a given environment and supervisor.

Parameters

string $environment
string $supervisor

Return Value

SupervisorOptions|null

at line 119
array toSupervisorOptions()

Convert the provisioning plan into an array of SupervisorOptions.

Return Value

array

at line 131
protected SupervisorOptions convert(string $supervisor, array $options)

Convert the given array of options into a SupervisorOptions instance.

Parameters

string $supervisor
array $options

Return Value

SupervisorOptions