abstract class Dtionable

This class stores the simplest form of a a condition (lower and upper boundaries) and a result.

Properties

protected mixed $lower

Lower boundary

protected mixed $upper

Upper boundary

protected mixed $result

Result of the condition

Methods

void
__construct(mixed $lower, mixed $upper, mixed $result)

Instanciate a Dtionable with a lower boundary, upper boundary and the result when the criterion is between these boundaries.

bool
match(mixed $criterion)

Match a criterion with lower and upper boundaries.

mixed
result()

Return the stored result

static Dtionable
fromArray(array $data)

Instanciate a Dtionable from an associative array

values>
toArray()

Get the instance as an array.

array
__serialize()

This method defines a serialization-friendly arbitrary representation of the object in form of an array.

void
__unserialize(array $data)

This method is passed the restored array that was returned from __serialize(). It may then restore the properties of the object from that array as appropriate.

Details

at line 42
void __construct(mixed $lower, mixed $upper, mixed $result)

Instanciate a Dtionable with a lower boundary, upper boundary and the result when the criterion is between these boundaries.

Parameters

mixed $lower

Lower boundary

mixed $upper

Upper boundary

mixed $result

Return Value

void

at line 56
abstract bool match(mixed $criterion)

Match a criterion with lower and upper boundaries.

Parameters

mixed $criterion

Return Value

bool

at line 63
mixed result()

Return the stored result

Return Value

mixed

at line 74
static Dtionable fromArray(array $data)

Instanciate a Dtionable from an associative array

Parameters

array $data

Return Value

Dtionable

at line 84
values> toArray()

Get the instance as an array.

Return Value

values>

at line 99
array __serialize()

This method defines a serialization-friendly arbitrary representation of the object in form of an array.

Return Value

array

at line 113
void __unserialize(array $data)

This method is passed the restored array that was returned from __serialize(). It may then restore the properties of the object from that array as appropriate.

Parameters

array $data

Return Value

void