/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Collection/Iterator
NameSizeModeActions
BufferedIterator.php47700644editdlrm
ExtractIterator.php29520644editdlrm
FilterIterator.php27390644editdlrm
InsertIterator.php38110644editdlrm
MapReduce.php57540644editdlrm
NestIterator.php22550644editdlrm
NoChildrenIterator.php13680644editdlrm
ReplaceIterator.php28780644editdlrm
SortIterator.php31200644editdlrm
StoppableIterator.php33170644editdlrm
TreeIterator.php34880644editdlrm
TreePrinter.php35180644editdlrm
UnfoldIterator.php26300644editdlrm
ZipIterator.php35840644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Collection/Iterator/StoppableIterator.php (3317B)
_condition = $condition; parent::__construct($items); $this->_innerIterator = $this->getInnerIterator(); } /** * Evaluates the condition and returns its result, this controls * whether or not more results will be yielded. * * @return bool */ public function valid(): bool { if (!parent::valid()) { return false; } $current = $this->current(); $key = $this->key(); $condition = $this->_condition; return !$condition($current, $key, $this->_innerIterator); } /** * @inheritDoc */ public function unwrap(): Traversable { $iterator = $this->_innerIterator; if ($iterator instanceof CollectionInterface) { $iterator = $iterator->unwrap(); } if (get_class($iterator) !== ArrayIterator::class) { return $this; } // ArrayIterator can be traversed strictly. // Let's do that for performance gains $callback = $this->_condition; $res = []; foreach ($iterator as $k => $v) { if ($callback($v, $k, $iterator)) { break; } $res[$k] = $v; } return new ArrayIterator($res); } }