Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractArray.php

function AbstractArray::getIterator

Returns an iterator for this array.

@link http://php.net/manual/en/iteratoraggregate.getiterator.php IteratorAggregate::getIterator()

Return value

Traversable<array-key, T>

4 calls to AbstractArray::getIterator()
AbstractMap::getIterator in vendor/ramsey/collection/src/Map/AbstractMap.php
AbstractMap::getIterator in vendor/ramsey/collection/src/Map/AbstractMap.php
BuilderCollection::getIterator in vendor/ramsey/uuid/src/Builder/BuilderCollection.php
@psalm-mutation-free @psalm-suppress ImpureMethodCall @psalm-suppress InvalidTemplateParam
BuilderCollection::getIterator in vendor/ramsey/uuid/src/Builder/BuilderCollection.php
@psalm-mutation-free @psalm-suppress ImpureMethodCall @psalm-suppress InvalidTemplateParam
2 methods override AbstractArray::getIterator()
AbstractMap::getIterator in vendor/ramsey/collection/src/Map/AbstractMap.php
BuilderCollection::getIterator in vendor/ramsey/uuid/src/Builder/BuilderCollection.php
@psalm-mutation-free @psalm-suppress ImpureMethodCall @psalm-suppress InvalidTemplateParam

File

vendor/ramsey/collection/src/AbstractArray.php, line 59

Class

AbstractArray
This class provides a basic implementation of `ArrayInterface`, to minimize the effort required to implement this interface.

Namespace

Ramsey\Collection

Code

public function getIterator() : Traversable {
    return new ArrayIterator($this->data);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal