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

Breadcrumb

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

class BundledComponentCollectionIterator

@template-implements Iterator<int,BundledComponent>

Hierarchy

  • class \PharIo\Manifest\BundledComponentCollectionIterator implements \Iterator

Expanded class hierarchy of BundledComponentCollectionIterator

File

vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php, line 17

Namespace

PharIo\Manifest
View source
class BundledComponentCollectionIterator implements Iterator {
    
    /** @var BundledComponent[] */
    private $bundledComponents;
    
    /** @var int */
    private $position = 0;
    public function __construct(BundledComponentCollection $bundledComponents) {
        $this->bundledComponents = $bundledComponents->getBundledComponents();
    }
    public function rewind() : void {
        $this->position = 0;
    }
    public function valid() : bool {
        return $this->position < count($this->bundledComponents);
    }
    public function key() : int {
        return $this->position;
    }
    public function current() : BundledComponent {
        return $this->bundledComponents[$this->position];
    }
    public function next() : void {
        $this->position++;
    }

}

Members

Title Sort descending Modifiers Object type Summary
BundledComponentCollectionIterator::$bundledComponents private property @var BundledComponent[]
BundledComponentCollectionIterator::$position private property @var int
BundledComponentCollectionIterator::current public function
BundledComponentCollectionIterator::key public function
BundledComponentCollectionIterator::next public function
BundledComponentCollectionIterator::rewind public function
BundledComponentCollectionIterator::valid public function
BundledComponentCollectionIterator::__construct public function

API Navigation

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