PdbModelInterface
in
The skeleton structure of a model.
- Querying
- Saving (create/update)
- Deleting
PdbModelTrait for implementations of find() and save().
Table of Contents
Methods
- delete() : bool
- Delete this model.
- find() : PdbModelQuery
- Create a query for this model.
- findAll() : array<string|int, static>
- Find a list of models.
- findOne() : static
- Find one model.
- getConnection() : Pdb
- The connection used queries in this model.
- getTableName() : string
- The table name for this model, non-prefixed.
- populate() : void
- Populate a model with a DB row.
- save() : bool
- Save this model.
Methods
delete()
Delete this model.
public
delete() : bool
Return values
boolfind()
Create a query for this model.
public
static find([array<string|int, mixed> $conditions = [] ]) : PdbModelQuery
Parameters
- $conditions : array<string|int, mixed> = []
Tags
Return values
PdbModelQueryfindAll()
Find a list of models.
public
static findAll([array<string|int, mixed> $conditions = [] ]) : array<string|int, static>
Parameters
- $conditions : array<string|int, mixed> = []
Tags
Return values
array<string|int, static>findOne()
Find one model.
public
static findOne(array<string|int, mixed> $conditions) : static
Parameters
- $conditions : array<string|int, mixed>
Tags
Return values
staticgetConnection()
The connection used queries in this model.
public
static getConnection() : Pdb
Return values
PdbgetTableName()
The table name for this model, non-prefixed.
public
static getTableName() : string
Return values
stringpopulate()
Populate a model with a DB row.
public
static populate(static $instance, array<string|int, mixed> $config) : void
Parameters
- $instance : static
- $config : array<string|int, mixed>
save()
Save this model.
public
save() : bool