class PreconditionResult (View source)

The result of a precondition check.

Constants

STATE_PASSED

Precondition result: passed.

STATE_WARNING

Precondition result: passed with warnings.

STATE_SKIPPED

Precondition result: skipped.

STATE_FAILED

Precondition result: failed.

Properties

protected int $state The precondition result state.
protected string $message The warning/error message.

Methods

__construct(int $state = self::STATE_PASSED, string $message = '')

Initialize the class instance.

int
getState()

Get the precondition result state.

$this
setState(int $value)

Set the precondition result state.

string
getMessage()

Get the warning/error message.

$this
setMessage(string $value)

Set the warning/error message.

Details

__construct(int $state = self::STATE_PASSED, string $message = '')

Initialize the class instance.

Parameters

int $state One of the PreconditionResult::STATE_... constants
string $message warning/error message

int getState()

Get the precondition result state.

Return Value

int One of the PreconditionResult::STATE_... constants.

$this setState(int $value)

Set the precondition result state.

Parameters

int $value One of the PreconditionResult::STATE_... constants.

Return Value

$this

string getMessage()

Get the warning/error message.

Return Value

string

$this setMessage(string $value)

Set the warning/error message.

Parameters

string $value

Return Value

$this