PHP 8.2.31
Preview: Mapper.php Size: 670 B
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nette/utils/src/Iterators/Mapper.php

<?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 RectorPrefix202411\Nette\Iterators;

/**
 * @deprecated use Nette\Utils\Iterables::map()
 */
class Mapper extends \IteratorIterator
{
    /** @var callable */
    private $callback;
    public function __construct(\Traversable $iterator, callable $callback)
    {
        parent::__construct($iterator);
        $this->callback = $callback;
    }
    /**
     * @return mixed
     */
    public function current()
    {
        return ($this->callback)(parent::current(), parent::key());
    }
}

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
2.91 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
670 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).