protected final function visitApply(O\MethodCallExpression $expression) { $sourceExpression = $expression->getValue(); //Determine whether this was a join/groupJoin apply operation if ($sourceExpression instanceof O\MethodCallExpression) { $methodName = $this->getMethodName($sourceExpression); if (in_array(strtolower($methodName), ['withdefault', 'on', 'onequality', 'join', 'groupjoin'], true)) { $this->visitJoinApply($expression); return; } } $this->interpretation->interpretApply('apply', $this->getFunctionAt('apply-function', 0, $expression)); $this->interpretSourceAsScope($expression); }
protected final function visitUnique(O\MethodCallExpression $expression) { $this->addSegment(function ($segmentId) { $this->interpretation->interpretUnique($segmentId); }); $this->visit($expression->getValue()); }
public function visitMethodCall(O\MethodCallExpression $expression) { $this->walk($expression->getValue()); $this->walk($expression->getName()); $this->walkAll($expression->getArguments()); $this->addTypeOperation($expression, $this->analysis[$expression->getValue()]->getMethod($expression)); }
/** * @param O\MethodCallExpression $methodExpression * * @return O\MethodCallExpression * @throws PinqException */ protected final function getSourceMethodCall(O\MethodCallExpression $methodExpression) { $sourceExpression = $methodExpression->getValue(); if (!$sourceExpression instanceof O\MethodCallExpression) { throw new PinqException('Cannot get source method call expression: source is not a method call, %s given', get_class($methodExpression)); } return $sourceExpression; }