User
extends Record
in package
implements
UserEntityInterface, UserEntityInterface, Scopeable, TokenGrantable
uses
EntityTrait
Table of Contents
Interfaces
- UserEntityInterface
- UserEntityInterface
- Scopeable
- TokenGrantable
Properties
- $grant_types : array<string|int, string>
- $password : mixed
- $scopes : array<string|int, ScopeEntityInterface>
- $spec : Spec|null
Methods
- __construct() : mixed
- Construct a new instance of the object from an associative array of data properties.
- create() : static|null
- Insert a new record into the database and return on an instance of this object representing that record, if successfully inserted.
- delete() : static|null
- Delete a record from the database, returning an object representing the deleted record, if successful
- getGrantTypes() : array<string|int, string>
- getScopes() : array<string|int, ScopeEntityInterface>
- passwordVerify() : bool
- read() : static|null
- Read a record from the database and return an instance of this object representing that record, if present
- retrieve() : array<string|int, static>
- Retrieve all records matching an optional array of properties as an array of objects representing those records
- save() : void
- setScopes() : mixed
- update() : static|null
- Update a record in the database and return an instance of this object representing that record, if successful
- databaseToObjectHook() : array<string|int, mixed>
- defineSpec() : Spec
- getSpec() : Spec
- objectToDatabaseHook() : array<string|int, mixed>
- assign() : mixed
- cloneIntoSelf() : mixed
- getPrimaryKey() : mixed
Properties
$grant_types
protected
array<string|int, string>
$grant_types
= []
$password
protected
mixed
$password
$scopes
protected
array<string|int, ScopeEntityInterface>
$scopes
= []
$spec
protected
static Spec|null
$spec
Methods
__construct()
Construct a new instance of the object from an associative array of data properties.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Associative array of properties (keys that do not exactly match a declared property will be ignored)
create()
Insert a new record into the database and return on an instance of this object representing that record, if successfully inserted.
public
static create(array<string|int, mixed> $data) : static|null
Parameters
- $data : array<string|int, mixed>
-
Associative array of properties (keys that do not exactly match a declared property will be ignored)
Return values
static|nulldelete()
Delete a record from the database, returning an object representing the deleted record, if successful
public
static delete(mixed $id) : static|null
Parameters
- $id : mixed
-
Primary key value
Return values
static|nullgetGrantTypes()
public
getGrantTypes() : array<string|int, string>
Return values
array<string|int, string>getScopes()
public
getScopes() : array<string|int, ScopeEntityInterface>
Return values
array<string|int, ScopeEntityInterface>passwordVerify()
public
passwordVerify(string $password) : bool
Parameters
- $password : string
Return values
boolread()
Read a record from the database and return an instance of this object representing that record, if present
public
static read(mixed $id) : static|null
Parameters
- $id : mixed
-
Primary key value
Return values
static|nullretrieve()
Retrieve all records matching an optional array of properties as an array of objects representing those records
public
static retrieve([array<string|int, mixed> $data = [] ]) : array<string|int, static>
Parameters
- $data : array<string|int, mixed> = []
-
Optional associative array of properties to match (keys that do not exactly match a declared property will be ignored)
Return values
array<string|int, static>save()
public
save([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
setScopes()
public
setScopes(mixed $scopes) : mixed
Parameters
- $scopes : mixed
update()
Update a record in the database and return an instance of this object representing that record, if successful
public
static update(array<string|int, mixed> $data) : static|null
Parameters
- $data : array<string|int, mixed>
-
Associative array of properties (keys that do not exactly match a declared property will be ignored). Must include a primary key property to identify the record to be updated.
Return values
static|nulldatabaseToObjectHook()
protected
static databaseToObjectHook(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>defineSpec()
protected
static defineSpec() : Spec
Return values
SpecgetSpec()
protected
static getSpec() : Spec
Return values
SpecobjectToDatabaseHook()
protected
static objectToDatabaseHook(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>assign()
private
assign(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
cloneIntoSelf()
private
cloneIntoSelf(self $other) : mixed
Parameters
- $other : self
getPrimaryKey()
private
getPrimaryKey() : mixed