ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
This describes some datastructure in terms of standard data structures such as primitives, lists, maps and objects and helpful (hopefully...) human readable texts. More...
Public Member Functions | |
__construct (protected ?Text\SimpleDocumentMarkdown $description,) | |
getDescription () | |
getPrimitiveRepresentation (mixed $data) | |
Each of the types that can be described has a canonical representation created from primitive PHP types. More... | |
matches (mixed $data) | |
This describes some datastructure in terms of standard data structures such as primitives, lists, maps and objects and helpful (hopefully...) human readable texts.
The class is not to be derived but instead acts as a common base class for all classes Description* in the subfolder. The set of Description* classes is fixed.
Definition at line 32 of file Description.php.
ILIAS\Data\Description\Description::__construct | ( | protected ?Text\SimpleDocumentMarkdown | $description | ) |
Definition at line 34 of file Description.php.
ILIAS\Data\Description\Description::getDescription | ( | ) |
Definition at line 39 of file Description.php.
References $data, and ILIAS\Data\Description\Description\getPrimitiveRepresentation().
|
abstract |
Each of the types that can be described has a canonical representation created from primitive PHP types.
This attempts to transform the provided data into such a representation.
If this returns a , the data cannot be transformed into such a representation and the will produce a generator that provides a list of defects where $data does not match the description. If this does return something else it will be plain old php data according to the description.
Referenced by ILIAS\Data\Description\Description\getDescription(), and ILIAS\Data\Description\Description\matches().
ILIAS\Data\Description\Description::matches | ( | mixed | $data | ) |
Definition at line 56 of file Description.php.
References ILIAS\Data\Description\Description\getPrimitiveRepresentation().