JsonApiMany
class JsonApiMany implements JsonApiElementInterface
Properties
| protected array | $resources | ||
| protected JsonApiSerializationInterface | $serializer | ||
| protected | $relationsPath |
Methods
__construct(mixed $data, mixed $serializer)
Create a new collection instance.
getSerializer()
No description
array
getResources()
Get the resources array.
void
setResources(array $resources)
Set the resources array.
array
toArray()
Map to a "resource object" array.
array
toIdentifier()
Map to a "resource object identifier" array.
$this
relations(string|array $relationships)
Request a relationship to be included.
$this
attributes($attributes)
Request a restricted set of fields.
buildResources(mixed $data, JsonApiSerializationInterface $serializer)
Convert an array of raw data to Resource objects.
mixed
getDenormalizedData($relationShips, $included, $name)
No description
Details
at line 26
__construct(mixed $data, mixed $serializer)
Create a new collection instance.
at line 35
getSerializer()
at line 43
setSerializer(JsonApiSerializationInterface $serializer)
at line 51
array
getResources()
Get the resources array.
at line 63
void
setResources(array $resources)
Set the resources array.
at line 71
array
toArray()
Map to a "resource object" array.
at line 81
array
toIdentifier()
Map to a "resource object identifier" array.
at line 92
$this
relations(string|array $relationships)
Request a relationship to be included.
at line 103
$this
attributes($attributes)
Request a restricted set of fields.
at line 119
protected JsonApiOne[]
buildResources(mixed $data, JsonApiSerializationInterface $serializer)
Convert an array of raw data to Resource objects.