Pinq\Queries\Segments\ProjectionSegment::update PHP Method

update() public method

public update ( ElementProjection $projectionFunction ) : static
$projectionFunction Pinq\Queries\Functions\ElementProjection
return static
    public function update(Functions\ElementProjection $projectionFunction)
    {
        if ($this->projectionFunction === $projectionFunction) {
            return $this;
        }
        return new static($projectionFunction);
    }

Usage Example

Beispiel #1
0
 protected function visitProjectionSegment(Segments\ProjectionSegment $segment)
 {
     return $segment->update($this->expressionProcessor->processFunction($segment->getProjectionFunction()));
 }