class Sequence (View source)

A boot sequence, consisting of individual steps, each of them initializing a specific part of the application.

Properties

protected string $identifier
protected array $steps

Methods

__construct(string $identifier)

No description

void
addStep(Step $step, string $previousStepIdentifier = 'start')

Adds the given step to this sequence, to be executed after then step specified by $previousStepIdentifier. If no previous step is specified, the new step is added to the list of steps executed right at the start of the sequence.

void
removeStep(string $stepIdentifier)

Removes all occurrences of the specified step from this sequence

void
invoke(Bootstrap $bootstrap)

Executes all steps of this sequence

void
invokeStep(Step $step, Bootstrap $bootstrap)

Invokes a single step of this sequence and also invokes all steps registered to be executed after the given step.

Details

__construct(string $identifier)

No description

Parameters

string $identifier

void addStep(Step $step, string $previousStepIdentifier = 'start')

Adds the given step to this sequence, to be executed after then step specified by $previousStepIdentifier. If no previous step is specified, the new step is added to the list of steps executed right at the start of the sequence.

Parameters

Step $step

The new step to add

string $previousStepIdentifier

The preceding step

Return Value

void

void removeStep(string $stepIdentifier)

Removes all occurrences of the specified step from this sequence

Parameters

string $stepIdentifier

Return Value

void

Exceptions

Exception

void invoke(Bootstrap $bootstrap)

Executes all steps of this sequence

Parameters

Bootstrap $bootstrap

Return Value

void

protected void invokeStep(Step $step, Bootstrap $bootstrap)

Invokes a single step of this sequence and also invokes all steps registered to be executed after the given step.

Parameters

Step $step

The step to invoke

Bootstrap $bootstrap

Return Value

void