class AddressSerializer extends JsonApiSerializerAbstract

Properties

protected $type

Methods

mixed
getDeserializationClass()

No description

string
getType(mixed $model = null)

Get the type.

string
getId(mixed $model)

Get the id.

array
getAttributes(Address $address, array $fields = null)

No description

array
getLinks(mixed $model)

Get the links array.

array
getMeta(mixed $model)

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

Details

at line 31
mixed getDeserializationClass()

Return Value

mixed

string getType(mixed $model = null)

Get the type.

Parameters

mixed $model

Return Value

string

string getId(mixed $model)

Get the id.

Parameters

mixed $model

Return Value

string

at line 19
array getAttributes(Address $address, array $fields = null)

Parameters

Address $address
array $fields

Return Value

array

Get the links array.

Parameters

mixed $model

Return Value

array

array getMeta(mixed $model)

Get the meta.

Parameters

mixed $model

Return Value

array

mixed setType(string $type)

Parameters

string $type

Return Value

mixed

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