public function __construct(Providers\IQueryProvider $provider, Queries\ISourceInfo $sourceInfo, O\TraversalExpression $queryExpression = null, IIteratorScheme $scheme = null) { parent::__construct($provider); $this->sourceInfo = $sourceInfo; $this->expression = $queryExpression ?: O\Expression::value($this); $this->scheme = $scheme ?: Iterators\SchemeProvider::getDefault(); }
public function orderedMaps() { $orderedMaps = []; foreach (\Pinq\Iterators\SchemeProvider::getAvailableSchemes() as $scheme) { $orderedMaps[] = [$scheme->createOrderedMap(), $scheme]; } return $orderedMaps; }
protected final function implementationsFor(array $data) { $implementations = []; foreach (\Pinq\Iterators\SchemeProvider::getAvailableSchemes() as $scheme) { $implementations = array_merge($implementations, [[new \Pinq\Traversable($data, $scheme), $data], [(new \Pinq\Providers\Traversable\Provider(new \Pinq\Traversable($data, $scheme)))->createQueryable(), $data]]); } return $implementations; }
public function schemes() { $schemes = []; foreach (SchemeProvider::getAvailableSchemes() as $scheme) { $schemes[] = [$scheme]; } return $schemes; }
protected function buildIteratorScheme() { return Iterators\SchemeProvider::getDefault(); }
public function __construct($elements = [], IIteratorScheme $scheme = null, Traversable $source = null) { $this->scheme = $scheme ?: Iterators\SchemeProvider::getDefault(); $this->source = $source; $this->elements = $this->scheme->toIterator($elements); }