DataMapper
in package
implements
ISerializable, JsonSerializable
AbstractYes
Table of Contents
Interfaces
- ISerializable
- JsonSerializable
Methods
- CreateNew() : bool
- Creates a new row by this class
- CreateOrUpdate() : bool
- Creates or Updates an existing row
- Delete() : bool
- Deletes an existing row
- getId() : mixed
- Gets the Primary Id
- getIdFieldName() : string
- Gets the primary id field for this class (if no primary id or multiple items for identification, overwrite all subclasses for create and update)
- getTableName() : string
- Gets the Table Name for this Data class
- jsonSerialize() : mixed
- Serializes the object to a value that can be serialized natively by json_encode()
- Map() : mixed
- Map Properties to a instance of this object
- MapArray() : null|array<string|int, mixed>
- Maps multiple items to instances of this object
- serializableObject() : mixed
- Returns the object as a serializable object
- setId() : void
- Sets the Primary Id
- Update() : bool
- Updates an existing Row by this class
Methods
CreateNew()
Creates a new row by this class
public
CreateNew() : bool
Return values
boolCreateOrUpdate()
Creates or Updates an existing row
public
CreateOrUpdate() : bool
Return values
boolDelete()
Deletes an existing row
public
Delete() : bool
Return values
boolgetId()
Gets the Primary Id
public
getId() : mixed
getIdFieldName()
Gets the primary id field for this class (if no primary id or multiple items for identification, overwrite all subclasses for create and update)
public
abstract getIdFieldName() : string
Return values
stringgetTableName()
Gets the Table Name for this Data class
public
abstract getTableName() : string
Return values
stringjsonSerialize()
Serializes the object to a value that can be serialized natively by json_encode()
public
jsonSerialize() : mixed
Map()
Map Properties to a instance of this object
public
static Map(null|array<string|int, mixed> $properties) : mixed
Parameters
- $properties : null|array<string|int, mixed>
MapArray()
Maps multiple items to instances of this object
public
static MapArray(null|array<string|int, mixed> $items) : null|array<string|int, mixed>
Parameters
- $items : null|array<string|int, mixed>
Return values
null|array<string|int, mixed>serializableObject()
Returns the object as a serializable object
public
serializableObject() : mixed
setId()
Sets the Primary Id
public
setId(mixed $id) : void
Parameters
- $id : mixed
-
Id to set
Update()
Updates an existing Row by this class
public
Update() : bool