/
home
/
techb158
/
dev.balacoffee.com
/
vendor
/
nette
/
utils
/
src
/
Iterators
/
/home/techb158/dev.balacoffee.com/vendor/nette/utils/src/Iterators
mkdir
upload
Name
Size
Mode
Actions
CachingIterator.php
3023
0644
edit
dl
rm
Mapper.php
601
0644
edit
dl
rm
Edit:
/home/techb158/dev.balacoffee.com/vendor/nette/utils/src/Iterators/Mapper.php
(601B)
<?php /** * This file is part of the Nette Framework (https://nette.org) * Copyright (c) 2004 David Grudl (https://davidgrudl.com) */ declare(strict_types=1); namespace Nette\Iterators; /** * Applies the callback to the elements of the inner iterator. */ class Mapper extends \IteratorIterator { /** @var callable */ private $callback; public function __construct(\Traversable $iterator, callable $callback) { parent::__construct($iterator); $this->callback = $callback; } public function current(): mixed { return ($this->callback)(parent::current(), parent::key()); } }
Save
callback = $callback; } public function current(): mixed { return ($this->callback)(parent::current(), parent::key()); } }