class Dtion extends Dtionable

This class stores a condition (lower and upper boundaries) and a result.

Properties

protected mixed $lower

Lower boundary

from  Dtionable
protected mixed $upper

Upper boundary

from  Dtionable
protected mixed $result

Result of the condition

from  Dtionable

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.

static Dtion
make($lowerBoundary, $upperBoundary, $result)

Static mode to instanciate a Dtion

Details

in Dtionable 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 31
bool match(mixed $criterion)

Match a criterion with lower and upper boundaries.

Parameters

mixed $criterion

Return Value

bool

in Dtionable at line 63
mixed result()

Return the stored result

Return Value

mixed

in Dtionable at line 74
static Dtionable fromArray(array $data)

Instanciate a Dtionable from an associative array

Parameters

array $data

Return Value

Dtionable

in Dtionable at line 84
values> toArray()

Get the instance as an array.

Return Value

values>

in Dtionable at line 99
array __serialize()

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

Return Value

array

in Dtionable 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

at line 19
static Dtion make($lowerBoundary, $upperBoundary, $result)

Static mode to instanciate a Dtion

Parameters

$lowerBoundary
$upperBoundary
$result

Return Value

Dtion

See also

\Dtion\Dtion::__construct()