BaseDbContent
extends BaseContent
in package
Class Basic database content
This is the basic content that all subtypes may extend
Tags
Table of Contents
- $db_fields : array<string|int, mixed>
- $dbal : DBAL|null
- The database abstraction layer buffer
- __construct() : mixed
- Basic constructor.
- Delete() : Result|null
- Delete from database
- Save() : Result|null
- database() : BookingsDBAL|null
- Get the database instance
- loadFromSrc() : void
- Fetch from db
Properties
$db_fields
protected
array<string|int, mixed>
$db_fields
= []
$dbal
The database abstraction layer buffer
protected
DBAL|null
$dbal
= null
Methods
__construct()
Basic constructor.
public
__construct([int|string|null $id = null ][, string|null $language = null ][, string $subtype = '' ]) : mixed
Parameters
- $id : int|string|null = null
-
The primary key
- $language : string|null = null
- $subtype : string = ''
Return values
mixed —Delete()
Delete from database
public
Delete([false $skip = false ]) : Result|null
Parameters
- $skip : false = false
Return values
Result|null —Save()
public
Save([false $force_new_id = false ]) : Result|null
Parameters
- $force_new_id : false = false
Return values
Result|null —database()
Get the database instance
protected
abstract database() : BookingsDBAL|null
Return values
BookingsDBAL|null —loadFromSrc()
Fetch from db
protected
loadFromSrc() : void