trait CollectsResources

Properties

static protected array<class-string, class-string|false> $cachedCollectsAttributes

The cached Collects attribute values.

Methods

mixed
collectResource(mixed $resource)

Map the given collection resource into its individual resources.

string|null
collects()

Get the resource that this resource collects.

int
jsonOptions()

Get the JSON serialization options that should be applied to the resource response.

getIterator()

Get an iterator for the resource collection.

Details

at line 30
protected mixed collectResource(mixed $resource)

Map the given collection resource into its individual resources.

Parameters

mixed $resource

Return Value

mixed

at line 56
protected string|null collects()

Get the resource that this resource collects.

Return Value

string|null

at line 90
int jsonOptions()

Get the JSON serialization options that should be applied to the resource response.

Return Value

int

Exceptions

ReflectionException

at line 106
Traversable getIterator()

Get an iterator for the resource collection.

Return Value

Traversable