Client
extends Record
in package
implements
ClientEntityInterface, UserAssignable, Scopeable, TokenGrantable
uses
EntityTrait, ClientTrait
Table of Contents
Interfaces
- ClientEntityInterface
- UserAssignable
- Scopeable
- TokenGrantable
Properties
- $description : string|null
- $grant_types : array<string|int, string>
- $scopes : array<string|int, ScopeEntityInterface>
- $spec : Spec|null
- $userIdentifier : string|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
- getDescription() : string|null
- getGrantTypes() : array<string|int, string>
- getScopes() : array<string|int, ScopeEntityInterface>
- getUserIdentifier() : string|int|null
- 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
- setGrantTypes() : mixed
- 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
$description
protected
string|null
$description
$grant_types
protected
array<string|int, string>
$grant_types
= []
$scopes
protected
array<string|int, ScopeEntityInterface>
$scopes
= []
$spec
protected
static Spec|null
$spec
$userIdentifier
protected
string|null
$userIdentifier
= null
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|nullgetDescription()
public
getDescription() : string|null
Return values
string|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>getUserIdentifier()
public
getUserIdentifier() : string|int|null
Return values
string|int|nullread()
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> = []
setGrantTypes()
public
setGrantTypes(array<string|int, mixed> $grantTypes) : mixed
Parameters
- $grantTypes : 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