class ErrorCollection implements IteratorAggregate (View source)

internal  JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it.
 

To be used when the primary data is errors.

Properties

protected HttpExceptionInterface[] $errors

The HTTP exceptions.

Methods

__construct(array $errors)

Instantiates an ErrorCollection object.

getIterator()

Returns an iterator for errors.

Details

__construct(array $errors)

Instantiates an ErrorCollection object.

Parameters

array $errors

The errors.

ArrayIterator getIterator()

Returns an iterator for errors.

Return Value

ArrayIterator

An \ArrayIterator instance