class Option (View source)

Represents an option for a configurable rule.

Properties

protected string $description

Option description.

protected bool|callable $required

Is this option required?

protected mixed $value

Option value.

Methods

__construct(string $description = '', bool|callable $required = false, mixed $value = null)

Initializes the instance.

string
getDescription()

Get the option description.

bool
isRequired()

Is this option required?

setValue(mixed $value)

Set the option value.

mixed
getValue()

Get the option value.

Details

__construct(string $description = '', bool|callable $required = false, mixed $value = null)

Initializes the instance.

Parameters

string $description

Option description.

bool|callable $required

Is this option required?

mixed $value

Initial rule option.

string getDescription()

Get the option description.

Return Value

string

bool isRequired()

Is this option required?

Return Value

bool

setValue(mixed $value)

Set the option value.

Parameters

mixed $value

mixed getValue()

Get the option value.

Return Value

mixed