Entity class abstract
Framework\MVC\Entity
Class Entity.
Implements:
JsonSerializable, Stringable
Defined in libraries/mvc/src/Entity.php
Properties #
- $_jsonFlags
- Sets the flags that will be used to encode/decode JSON in internal methods of this Entity class.
- $_jsonVars
- Sets the name of the properties that will be visible when this Entity is JSON encoded.
- $_timezone
- This timezone is used to convert times in the {@see Entity::toModel()} method.
$_jsonFlags
Sets the flags that will be used to encode/decode JSON in internal methods of this Entity class.
$_jsonVars
Sets the name of the properties that will be visible when this Entity is JSON encoded.
$_timezone
This timezone is used to convert times in the {@see Entity::toModel()} method.
Methods #
- __construct()
- -
- __get()
- -
- __isset()
- -
- __set()
- -
- __toString()
- Converts the entity to a JSON string. All properties will be included. Please note that sensitive property data may be exposed!
- __unset()
- -
- jsonSerialize()
- -
- toModel()
- Convert the Entity to an associative array accepted by Model methods.
- getObjectVars()
- -
- init()
- Used to initialize settings, set custom properties, etc. Called in the constructor just after the properties be populated.
- populate()
- -
- propertyNotDefined()
- -
- renderMethodName()
- -
- setProperty()
- -
- typeHint()
- Tries to convert the value according to the property type.
- typeHintCustom()
- Override this method to set customizable property types.
- typeHintNative()
- Tries to convert the property value to native PHP types.
- typeHintWebisters()
- Tries to convert the property value using Webisters types.
__construct()
- array $properties
__get()
- string $property
__isset()
- string $property
__set()
- string $property
- mixed $value
__toString()
Converts the entity to a JSON string. All properties will be included. Please note that sensitive property data may be exposed!
__unset()
- string $property
jsonSerialize()
toModel()
Convert the Entity to an associative array accepted by Model methods.
getObjectVars()
init()
Used to initialize settings, set custom properties, etc. Called in the constructor just after the properties be populated.
populate()
- array $properties
propertyNotDefined()
- string $property
renderMethodName()
- string $type - get or set
- string $property - Property name
setProperty()
- string $name
- mixed $value
typeHint()
Tries to convert the value according to the property type.
- string $propertyType
- mixed $value
typeHintCustom()
Override this method to set customizable property types.
- string $propertyType
- string $valueType
- mixed $value
typeHintNative()
Tries to convert the property value to native PHP types.
- string $propertyType
- string $valueType
- mixed $value
typeHintWebisters()
Tries to convert the property value using Webisters types.
- string $propertyType
- string $valueType
- mixed $value