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
$action
protected
string
$action
$entity
protected
string
$entity
$entityTableName
protected
string
$entityTableName
$fields
protected
array<string|int, FieldSpec>
$fields
= []
$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> = []
addFieldSpec()
public
addFieldSpec(FieldSpec $field) : mixed
Parameters
- $field : FieldSpec
current()
public
current() : mixed
Attributes
- #[ReturnTypeWillChange]
getAction()
public
getAction() : string
Return values
stringgetEntity()
public
getEntity() : string
Return values
stringgetEntityTableName()
public
getEntityTableName() : string
Return values
stringgetFieldByName()
public
getFieldByName(mixed $name) : FieldSpec|null
Parameters
- $name : mixed
Return values
FieldSpec|nullgetFieldNames()
public
getFieldNames() : array<string|int, mixed>
Return values
array<string|int, mixed> —Gets all the field names currently part of the specification
getFields()
public
getFields() : array<string|int, FieldSpec>
Return values
array<string|int, FieldSpec>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
boolkey()
public
key() : mixed
Attributes
- #[ReturnTypeWillChange]
next()
public
next() : void
rewind()
public
rewind() : mixed
Attributes
- #[ReturnTypeWillChange]
valid()
public
valid() : bool
Return values
boolgetValues()
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