File manager - Edit - /var/www/payraty/helpdesk/vendor/rector/rector/vendor/nette/utils/src/Iterators/Mapper.php
Back
<?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 RectorPrefix202208\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; } #[\ReturnTypeWillChange] public function current() { return ($this->callback)(parent::current(), parent::key()); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings