nur-sery/nur_src/mapper/pl.php

18 lines
422 B
PHP

<?php
namespace nur\mapper;
use nur\mapper\base\Consumer;
use nur\mapper\base\Mapper;
class pl {
/**
* appliquer un ensemble de mappers, instances de {@link Mapper}, sur un
* iterable, typiquement une instance de {@link Producer}
*/
static final function consume($producer, ...$mappers): Consumer {
$consumer = new Consumer($producer, ...$mappers);
$consumer->consume();
return $consumer;
}
}