Documentation

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 = []

$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|null

delete()

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|null

getDescription()

public getDescription() : string|null
Return values
string|null

getGrantTypes()

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|null

read()

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|null

retrieve()

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|null

databaseToObjectHook()

protected static databaseToObjectHook(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

objectToDatabaseHook()

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

        
On this page

Search results