class AgentSerializer 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(mixed $agent, 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

group(Agent $agent)

No description

superior(Agent $agent)

No description

image(Agent $agent)

No description

address(Agent $agent)

No description

Details

at line 85
mixed getDeserializationClass()

Return Value

mixed

string getType(mixed $model = null)

Get the type.

Parameters

mixed $model

Return Value

string

at line 16
string getId(mixed $model)

Get the id.

Parameters

mixed $model

Return Value

string

at line 27
array getAttributes(mixed $agent, array $fields = null)

Parameters

mixed $agent
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

at line 53
JsonApiRelationship group(Agent $agent)

Parameters

Agent $agent

Return Value

JsonApiRelationship

at line 62
JsonApiRelationship superior(Agent $agent)

Parameters

Agent $agent

Return Value

JsonApiRelationship

at line 71
JsonApiRelationship image(Agent $agent)

Parameters

Agent $agent

Return Value

JsonApiRelationship

at line 80
JsonApiRelationship address(Agent $agent)

Parameters

Agent $agent

Return Value

JsonApiRelationship