You are here

public function ErrorCollection::getIterator in JSON:API 8.2

Returns an iterator for errors.

Return value

\ArrayIterator An \ArrayIterator instance

File

src/JsonApiResource/ErrorCollection.php, line 50

Class

ErrorCollection
To be used when the primary data is `errors`.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public function getIterator() {
  return new \ArrayIterator($this->errors);
}