Documentation

RequestSpec
in package
implements Iterator

Table of Contents

Interfaces

Iterator

Properties

$action  : string
$entity  : string
$entityTableName  : string
$fields  : array<string|int, FieldSpec>
$values  : array<string|int, mixed>
$valuesUsed  : array<string|int, mixed>

Methods

__construct()  : mixed
addFieldSpec()  : mixed
current()  : mixed
getAction()  : string
getEntity()  : string
getEntityTableName()  : string
getFieldByName()  : FieldSpec|null
getFieldNames()  : array<string|int, mixed>
getFields()  : array<string|int, FieldSpec>
getRequiredFields()  : array<string|int, mixed>|array<string|int, FieldSpec>
getValue()  : mixed
getValuesUsed()  : array<string|int, mixed>
What values were requested by specProviders
hasValue()  : bool
key()  : mixed
next()  : void
rewind()  : mixed
valid()  : bool
getValues()  : array<string|int, mixed>
Private because we want everyone downstream to use getValue() and hasValue().
resolveValue()  : mixed
Resolve requested value based on available data in $values e.g. if `id` is available then we can use it to look up other values.

Properties

$values

protected array<string|int, mixed> $values = []

$valuesUsed

protected array<string|int, mixed> $valuesUsed = []

Methods

__construct()

public __construct(string $entity, string $action[, array<string|int, mixed> $values = [] ]) : mixed
Parameters
$entity : string
$action : string
$values : array<string|int, mixed> = []

current()

public current() : mixed
Attributes
#[ReturnTypeWillChange]

getAction()

public getAction() : string
Return values
string

getEntity()

public getEntity() : string
Return values
string

getEntityTableName()

public getEntityTableName() : string
Return values
string

getFieldNames()

public getFieldNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

Gets all the field names currently part of the specification

getRequiredFields()

public getRequiredFields() : array<string|int, mixed>|array<string|int, FieldSpec>
Return values
array<string|int, mixed>|array<string|int, FieldSpec>

getValue()

public getValue(string $key) : mixed
Parameters
$key : string

getValuesUsed()

What values were requested by specProviders

public getValuesUsed() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasValue()

public hasValue(string $key) : bool
Parameters
$key : string
Return values
bool

key()

public key() : mixed
Attributes
#[ReturnTypeWillChange]

rewind()

public rewind() : mixed
Attributes
#[ReturnTypeWillChange]

getValues()

Private because we want everyone downstream to use getValue() and hasValue().

private getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

resolveValue()

Resolve requested value based on available data in $values e.g. if `id` is available then we can use it to look up other values.

private resolveValue(string $key) : mixed
Parameters
$key : string

        
On this page

Search results