public function LinkCollection::getIterator in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/LinkCollection.php \Drupal\jsonapi\JsonApiResource\LinkCollection::getIterator()
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ LinkCollection.php, line 65
Class
- LinkCollection
- Contains a set of JSON:API Link objects.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function getIterator() {
assert(!is_null($this->context), 'A LinkCollection is invalid unless a context has been established.');
return new \ArrayIterator($this->links);
}