Pinq\Iterators\SchemeProvider::getDefault PHP Method

getDefault() public static method

public static getDefault ( ) : Pinq\Iterators\IIteratorScheme
return Pinq\Iterators\IIteratorScheme
    public static function getDefault()
    {
        $schemes = self::getAvailableSchemes();
        if (empty($schemes)) {
            throw new PinqException('Cannot get default iterator scheme: None are supported in the PHP v%s', PHP_VERSION);
        }
        return clone $schemes[0];
    }

Usage Example

Example #1
0
 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();
 }
All Usage Examples Of Pinq\Iterators\SchemeProvider::getDefault