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

public interpretScopeSource ( Pinq\IQueryable $queryable )
$queryable Pinq\IQueryable
Пример #1
0
 protected final function visit(O\Expression $expression)
 {
     if ($expression instanceof O\ValueExpression) {
         $queryable = $expression->getValue();
         if (!$queryable instanceof IQueryable) {
             throw new PinqException('Invalid scope expression: must originate from %s, %s given', IQueryable::IQUERYABLE_TYPE, Utilities::getTypeOrClass($queryable));
         }
         if ($queryable->isSource()) {
             $this->addSegment(function () use($queryable) {
                 $this->interpretation->interpretScopeSource($queryable);
             });
             return;
         }
         $expression = $queryable->getExpression();
     }
     $methodName = $this->getMethodName($expression);
     $this->segmentCounter++;
     $this->segmentId = "{$this->segmentCounter}-{$methodName}";
     if (!method_exists($this, "visit{$methodName}")) {
         throw new PinqException('Cannot interpret query scope with method call \'%s\'', $methodName);
     }
     $this->{"visit{$methodName}"}($expression);
 }