- Add package.json dependencies: jquery, jquery-ui, moment, daterangepicker, wavesurfer.js, air-datepicker - Create scripts/setup-vendor.js to copy npm packages to public/assets/vendor - Update view templates to use vendor paths instead of old /js/ or CDN URLs - Clean up legacy commented-out scripts in master layout
34 lines
585 B
PHP
34 lines
585 B
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 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;
|
|
}
|
|
|
|
|
|
public function current(): mixed
|
|
{
|
|
return ($this->callback)(parent::current(), parent::key());
|
|
}
|
|
}
|