function ErrorCollection::getIterator
Same name in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/ErrorCollection.php \Drupal\jsonapi\JsonApiResource\ErrorCollection::getIterator()
- 8.9.x core/modules/jsonapi/src/JsonApiResource/ErrorCollection.php \Drupal\jsonapi\JsonApiResource\ErrorCollection::getIterator()
- 11.x core/modules/jsonapi/src/JsonApiResource/ErrorCollection.php \Drupal\jsonapi\JsonApiResource\ErrorCollection::getIterator()
Returns an iterator for errors.
Return value
\ArrayIterator An \ArrayIterator instance
File
-
core/
modules/ jsonapi/ src/ JsonApiResource/ ErrorCollection.php, line 50
Class
- ErrorCollection
- To be used when the primary data is `errors`.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function getIterator() {
return new \ArrayIterator($this->errors);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.