Methods
__construct()
__construct(array | \Traversable | \Zend\Paginator\Paginator $collection, string $resourceRoute, $resourceRouteParams, $resourceRouteOptions)
Parameters
$collection
array
\Traversable
\Zend\Paginator\Paginator
$resourceRoute
string
$resourceRouteParams
$resourceRouteOptions
Exceptions
Proxy to properties to allow read access
__get(string $name) : mixed
Parameters
$name
string
Returns
mixed
Set additional attributes to render as part of resource
setAttributes(array $attributes) : \PhlyRestfully\HalCollection
Parameters
$attributes
array
Returns
Set the collection name (for use within the _embedded object)
setCollectionName(string $name) : \PhlyRestfully\HalCollection
Parameters
$name
string
Returns
Set the collection route; used for generating pagination links
setCollectionRoute(string $route) : \PhlyRestfully\HalCollection
Parameters
$route
string
Returns
Set options to use with the collection route; used for generating pagination links
setCollectionRouteOptions(array | \Traversable $options) : \PhlyRestfully\HalCollection
Parameters
$options
array
\Traversable
Exceptions
Returns
Set parameters/substitutions to use with the collection route; used for generating pagination links
setCollectionRouteParams(array | \Traversable $params) : \PhlyRestfully\HalCollection
Parameters
$params
array
\Traversable
Exceptions
Returns
Set the resource key that represents the identifier name
setIdentifierName(string $name) : \PhlyRestfully\HalCollection
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
$name
string
Returns
Set link collection
setLinks(\PhlyRestfully\LinkCollection $links) : \PhlyRestfully\HalCollection
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
Returns
Set current page
setPage(int $page) : \PhlyRestfully\HalCollection
Parameters
$page
int
Exceptions
Returns
Set page size
setPageSize(int $size) : \PhlyRestfully\HalCollection
Parameters
$size
int
Exceptions
Returns
Set default set of links to use for resources
setResourceLinks(\PhlyRestfully\LinkCollection $links) : \PhlyRestfully\HalCollection
fluent |
This method is part of a fluent interface and will return the same instance |
Parameters
Returns
Set options to use with the resource route
setResourceRouteOptions(array | \Traversable $options) : \PhlyRestfully\HalCollection
Parameters
$options
array
\Traversable
Exceptions
Returns
Set parameters/substitutions to use with the resource route
setResourceRouteParams(array | \Traversable $params) : \PhlyRestfully\HalCollection
Parameters
$params
array
\Traversable
Exceptions
Returns