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\ManifestView 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 |