class FJsonApiSerializer extends JsonApiSerializerAbstract

Class FJsonApiSerializer

Properties

protected string $type The type. from JsonApiSerializerAbstract

Methods

mixed
getDeserializationClass()

No description

string
getType(mixed $model = null)

Get the type.

string
getId(mixed $model)

Get the id.

array
getAttributes(mixed $model, array $fields = null)

Get the attributes array.

array
getLinks($resource)

Get the links array.

array
getMeta($resource)

Get the meta.

mixed
setType(string $type)

No description

getRelationship(mixed $model, string $name)

Get a relationship.

string
getRelationshipMethodName(string $name)

Get the serializer method name for the given relationship.

$this
setDocumentType($type)

No description

$this
setDeserializationClass($deserializationClass)

No description

__construct(EntityManager $entityManager)

FJsonApiSerializer constructor.

mixed
getAttributesMapping()

No description

setAttributesMapping(mixed $attributesMapping)

No description

__call($method, $args)

No description

$this
setMappings($mappings)

No description

mixed
getMappings()

No description

array
getDisabledAttributes()

No description

mixed
deserialize($data, array $mappings, $relations)

No description

serialize($data, array $mappings, $relations, array $disabledAttributes = array(), array $attributeMappings = array())

No description

$this
setDisabledAttributes(array $disabledAttributes)

No description

Details

at line 192
mixed getDeserializationClass()

Return Value

mixed

string getType(mixed $model = null)

Get the type.

Parameters

mixed $model

Return Value

string

at line 107
string getId(mixed $model)

Get the id.

Parameters

mixed $model

Return Value

string

at line 172
array getAttributes(mixed $model, array $fields = null)

Get the attributes array.

Parameters

mixed $model
array $fields

Return Value

array

Get the links array.

Parameters

$resource

Return Value

array

at line 292
array getMeta($resource)

Get the meta.

Parameters

$resource

Return Value

array

mixed setType(string $type)

Parameters

string $type

Return Value

mixed

at line 157
JsonApiRelationship|null getRelationship(mixed $model, string $name)

Get a relationship.

Parameters

mixed $model
string $name

Return Value

JsonApiRelationship|null

protected string getRelationshipMethodName(string $name)

Get the serializer method name for the given relationship.

kebab-case is converted into camelCase.

Parameters

string $name

Return Value

string

$this setDocumentType($type)

Parameters

$type

Return Value

$this

at line 67
$this setDeserializationClass($deserializationClass)

Parameters

$deserializationClass

Return Value

$this

at line 77
__construct(EntityManager $entityManager)

FJsonApiSerializer constructor.

Parameters

EntityManager $entityManager

at line 91
mixed getAttributesMapping()

Return Value

mixed

at line 99
setAttributesMapping(mixed $attributesMapping)

Parameters

mixed $attributesMapping

at line 113
__call($method, $args)

Parameters

$method
$args

at line 141
$this setMappings($mappings)

Parameters

$mappings

Return Value

$this

at line 151
mixed getMappings()

Return Value

mixed

at line 200
array getDisabledAttributes()

Return Value

array

at line 211
mixed deserialize($data, array $mappings, $relations)

Parameters

$data
array $mappings
$relations

Return Value

mixed

at line 226
JsonApiDocument serialize($data, array $mappings, $relations, array $disabledAttributes = array(), array $attributeMappings = array())

Parameters

$data
array $mappings
$relations
array $disabledAttributes
array $attributeMappings

Return Value

JsonApiDocument

Exceptions

Exception

at line 263
$this setDisabledAttributes(array $disabledAttributes)

Parameters

array $disabledAttributes

Return Value

$this