Pinq\Tests\Integration\Queries\QueryParsingTest::exampleFromDocsQuery PHP Method

exampleFromDocsQuery() protected method

protected exampleFromDocsQuery ( )
    protected function exampleFromDocsQuery()
    {
        $rowExpression = O\Expression::variable(O\Expression::value('row'));
        return $this->scopeRequest([new Q\Segments\Filter(new Q\Functions\ElementProjection($this->parameter(), self::SCOPE_TYPE, self::SCOPE_NAMESPACE, [$this->parameter() => 'this'], [O\Expression::parameter('row')], [O\Expression::returnExpression(O\Expression::binaryOperation(O\Expression::index($rowExpression, O\Expression::value('age')), O\Operators\Binary::LESS_THAN_OR_EQUAL_TO, O\Expression::value(50)))])), new Q\Segments\OrderBy([new Q\Segments\Ordering($this->indexProjection('firstName'), $this->parameter()), new Q\Segments\Ordering($this->indexProjection('lastName'), $this->parameter())]), new Q\Segments\Range($this->parameter(), $this->parameter()), new Q\Segments\IndexBy($this->indexProjection('phoneNumber')), new Q\Segments\Select(new Q\Functions\ElementProjection($this->parameter(), self::SCOPE_TYPE, self::SCOPE_NAMESPACE, [$this->parameter() => 'this'], [O\Expression::parameter('row')], [O\Expression::returnExpression(O\Expression::arrayExpression([O\Expression::arrayItem(O\Expression::value('fullName'), O\Expression::binaryOperation(O\Expression::binaryOperation(O\Expression::index($rowExpression, O\Expression::value('firstName')), O\Operators\Binary::CONCATENATION, O\Expression::value(' ')), O\Operators\Binary::CONCATENATION, O\Expression::index($rowExpression, O\Expression::value('lastName')))), O\Expression::arrayItem(O\Expression::value('address'), O\Expression::index($rowExpression, O\Expression::value('address'))), O\Expression::arrayItem(O\Expression::value('dateOfBirth'), O\Expression::index($rowExpression, O\Expression::value('dateOfBirth')))]))]))]);
    }