FieldsToSave implements ContainerAwareInterface, JsonSerializable Uses ContainerAwareTrait
Interfaces, Classes and Traits
- ContainerAwareInterface
- JsonSerializable
Table of Contents
- $container : Container
- $fields : array<string|int, mixed>
- $id : string|null
- $operation : mixed
- $type : Type
- container() : void
- created() : void
- fields() : FieldsToSave
- getAttributes() : array<string|int, Attribute>
- getFieldNames() : array<string|int, mixed>
- getFields() : array<string|int, mixed>
- getId() : string|null
- getNestedField() : FieldsToSave|array<string|int, FieldsToSave>
- getOperation() : string
- getRelations() : array<string|int, Relation>
- getType() : Type
- hasField() : bool
- id() : FieldsToSave
- jsonSerialize() : mixed
- operation() : FieldsToSave
- typeClass() : FieldsToSave
- createNestedFields() : FieldsToSave
- getRelation() : Relation
- getTypeClassByName() : string
- hasAttribute() : bool
- hasRelation() : bool
- normalize() : array<string|int, mixed>
- filter out all non allowed fields from request
Properties
$container
protected
Container
$container
$fields
protected
array<string|int, mixed>
$fields
$id
protected
string|null
$id
= null
$operation
protected
mixed
$operation
= AfeefaApiResourcesApiOperation::UPDATE
$type
protected
Type
$type
Methods
container()
public
container(Container $container) : void
Parameters
- $container : Container
Return values
void —created()
public
created() : void
Return values
void —fields()
public
fields(array<string|int, mixed> $fields) : FieldsToSave
Parameters
- $fields : array<string|int, mixed>
Return values
FieldsToSave —getAttributes()
public
getAttributes() : array<string|int, Attribute>
Return values
array<string|int, Attribute> —getFieldNames()
public
getFieldNames() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFields()
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —getId()
public
getId() : string|null
Return values
string|null —getNestedField()
public
getNestedField(mixed $fieldName) : FieldsToSave|array<string|int, FieldsToSave>
Parameters
- $fieldName : mixed
Return values
FieldsToSave|array<string|int, FieldsToSave> —getOperation()
public
getOperation() : string
Return values
string —getRelations()
public
getRelations() : array<string|int, Relation>
Return values
array<string|int, Relation> —getType()
public
getType() : Type
Return values
Type —hasField()
public
hasField(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —id()
public
id(string $id) : FieldsToSave
Parameters
- $id : string
Return values
FieldsToSave —jsonSerialize()
public
jsonSerialize() : mixed
Return values
mixed —operation()
public
operation(string $operation) : FieldsToSave
Parameters
- $operation : string
Return values
FieldsToSave —typeClass()
public
typeClass(string $TypeClass) : FieldsToSave
Parameters
- $TypeClass : string
Return values
FieldsToSave —createNestedFields()
protected
createNestedFields(string $TypeClass, array<string|int, mixed> $fields) : FieldsToSave
Parameters
- $TypeClass : string
- $fields : array<string|int, mixed>
Return values
FieldsToSave —getRelation()
protected
getRelation(string $name) : Relation
Parameters
- $name : string
Return values
Relation —getTypeClassByName()
protected
getTypeClassByName([string $typeName = null ]) : string
Parameters
- $typeName : string = null
Return values
string —hasAttribute()
protected
hasAttribute(string $name) : bool
Parameters
- $name : string
Return values
bool —hasRelation()
protected
hasRelation(string $name) : bool
Parameters
- $name : string
Return values
bool —normalize()
filter out all non allowed fields from request
protected
normalize(array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
- $fields : array<string|int, mixed>