public function __construct(MapInterface $featureMap, $index = null, LoggerInterface $logger = null, callable $callback = null)
{
$this->setLogger($logger ?: new NullLogger());
$this->featureMap = $featureMap;
$this->index = $index === null ? $this->randomIndex() : $index;
$this->callback = !is_null($callback) ? $callback : function () {
};
}