class PreconditionService (View source)

Service class for installation preconditions.

Properties

protected Application $app

The application instance.

protected Repository $config

The configuration repository.

Methods

__construct(Application $app, Repository $config)

Initializes the instance.

getPreconditions(bool $includeWebPreconditions = true)

Get the pre-configuration preconditions.

getOptionsPreconditions()

Get the post-configuration preconditions.

getPreconditionByHandle(string $handle)

Get a precondition given its handle.

getPreconditionByClassName(string $className)

Get a precondition given its fully-qualified class name.

getAllPreconditions()

Get all the defined preconditions, of any kind.

Details

__construct(Application $app, Repository $config)

Initializes the instance.

Parameters

Application $app

the application instance

Repository $config

the configuration repository

PreconditionInterface[] getPreconditions(bool $includeWebPreconditions = true)

Get the pre-configuration preconditions.

Parameters

bool $includeWebPreconditions

Return Value

PreconditionInterface[]

OptionsPreconditionInterface[] getOptionsPreconditions()

Get the post-configuration preconditions.

PreconditionInterface getPreconditionByHandle(string $handle)

Get a precondition given its handle.

Parameters

string $handle

the precondition handle

Return Value

PreconditionInterface

Exceptions

Exception

PreconditionInterface getPreconditionByClassName(string $className)

Get a precondition given its fully-qualified class name.

Parameters

string $className

the fully-qualified class name of the precondition

Return Value

PreconditionInterface

Exceptions

Exception

private PreconditionInterface[] getAllPreconditions()

Get all the defined preconditions, of any kind.

Return Value

PreconditionInterface[]