DtionList
class DtionList implements Countable
This class stores a list of Dtion, allowing the user to find() the corresponding Dtion (therefor the result) among multiple conditions.
Properties
| protected Dtionable[] | $container | Internal container |
Methods
Find the first dtion to match $critera, and returns it or null otherwise.
Find the first dtion to match $critera, and returns it's result.
Instanciate from array of arrays, given by self::toArray() method
No description
No description
This method defines a serialization-friendly arbitrary representation of the object in form of an array.
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 31
void
__construct(Dtionable[]|null $dtions = null)
Construct an empty Dtion
at line 52
static DtionList
make(Dtionable[]|null $dtions = null)
Static mode to instanciate a Dtion
at line 64
void
push(Dtionable $dtion)
Push a Dtion to the list.
at line 76
Dtionable|null
find(mixed $criterion)
Find the first dtion to match $critera, and returns it or null otherwise.
at line 96
mixed
resultFor(mixed $criterion)
Find the first dtion to match $critera, and returns it's result.
at line 113
static DtionList
fromArray(array $data)
Instanciate from array of arrays, given by self::toArray() method
at line 125
toArray()
No description
at line 137
int
count()
No description
at line 148
array
__serialize()
This method defines a serialization-friendly arbitrary representation of the object in form of an array.
at line 162
void
__unserialize(array $dtions)
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.