Pinq\Iterators\IIteratorScheme::projectionIterator PHP Метод

projectionIterator() публичный Метод

Returns an iterator which will return the elements mapped by the supplied functions or the original if no function is supplied.
public projectionIterator ( Traversable $iterator, callable $keyProjectionFunction = null, callable $valueProjectionFunction = null ) : Pinq\Iterators\IWrapperIterator
$iterator Traversable
$keyProjectionFunction callable
$valueProjectionFunction callable
Результат Pinq\Iterators\IWrapperIterator
    public function projectionIterator(\Traversable $iterator, callable $keyProjectionFunction = null, callable $valueProjectionFunction = null);

Usage Example

Пример #1
0
 private function mapIterator(callable $function = null)
 {
     if ($function === null) {
         return $this->elements;
     } else {
         return $this->scheme->projectionIterator($this->elements, null, $function);
     }
 }
All Usage Examples Of Pinq\Iterators\IIteratorScheme::projectionIterator