JsonApiSerializerAbstract
abstract class JsonApiSerializerAbstract implements JsonApiSerializationInterface
Properties
| protected string | $type | The type. |
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(mixed $model)
Get the links array.
array
getMeta(mixed $model)
Get the meta.
mixed
setType(string $type)
No description
JsonApiRelationship|null
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 11
abstract mixed
getDeserializationClass()
at line 22
string
getType(mixed $model = null)
Get the type.
at line 29
string
getId(mixed $model)
Get the id.
at line 36
array
getAttributes(mixed $model, array $fields = null)
Get the attributes array.
at line 43
array
getLinks(mixed $model)
Get the links array.
at line 51
array
getMeta(mixed $model)
Get the meta.
at line 60
mixed
setType(string $type)
at line 72
JsonApiRelationship|null
getRelationship(mixed $model, string $name)
Get a relationship.
at line 95
protected string
getRelationshipMethodName(string $name)
Get the serializer method name for the given relationship.
kebab-case is converted into camelCase.