Entity
abstract class Entity
Class Entity
Properties
DebugTool | $debugTool | The debug tool used. | |
string | $shortName | Class short name. | |
bool | $exists | ||
string | $id | ||
string | $idField | ||
string | $nameField | ||
array | $newData | ||
array | $oldData |
Methods
Entity constructor.
Return the value of id.
Returns the name of the identification field of the record. By default it will be name.
Assign newData from $data.
Returns the name of the main key field of the table (PK-Primary Key). By default it will be id.
Return newData details.
Return oldData details.
Assign oldData from an array.
Execute a magic method of the setField or getField style
Magic getter.
Magic setter.
Magic isset.
Details
at line 92
__construct()
Entity constructor.
at line 106
string
getId()
Return the value of id.
at line 116
string
getNameField()
Returns the name of the identification field of the record. By default it will be name.
at line 128
$this
setData(array $data)
Assign newData from $data.
at line 143
string
getIdField()
Returns the name of the main key field of the table (PK-Primary Key). By default it will be id.
at line 153
array
getData()
Return newData details.
at line 163
array
getOldData()
Return oldData details.
at line 175
$this
setOldData(array $data)
Assign oldData from an array.
at line 191
$this|mixed|null
__call(string $method, array $params)
Execute a magic method of the setField or getField style
at line 220
mixed
__get(string $propertyName)
Magic getter.
It allows access to a field of the record using the attribute. To access the name field, we should use $this->getName(), but thanks to this, we can also use $this->name.
at line 236
$this
__set(string $propertyName, mixed $propertyValue)
Magic setter.
Allows you to assign value to a field in the record using the attribute. To assign a value to the name field, we should use $this->setName('Pepe'), but thanks to this, we can also use $this->name='Pepe'.
at line 252
bool
__isset(string $propertyName)
Magic isset.