Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
public getFirstResult ( ) : integer | ||
return | integer | The position of the first result. |
/** * @test */ public function getFirstResultDelegatesToConcreteQueryBuilder() { $this->concreteQueryBuilder->getFirstResult()->shouldBeCalled()->willReturn(1); $this->subject->getFirstResult(); }
public function testSetFirstResult() { $qb = new QueryBuilder($this->conn); $qb->setFirstResult(10); $this->assertEquals(QueryBuilder::STATE_DIRTY, $qb->getState()); $this->assertEQuals(10, $qb->getFirstResult()); }
/** * Gets the position of the first result the query object was set to retrieve (the "offset"). * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. * * @return int The position of the first result. */ public function getFirstResult() : int { return (int) $this->concreteQueryBuilder->getFirstResult(); }
/** * Gets the position of the first result the query object was set to retrieve (the "offset"). * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. * * @return integer The position of the first result. */ public function getFirstResult() { return $this->queryBuilder->getFirstResult(); }
/** * Gets the position of the first result the query object was set to retrieve (the "offset"). * Returns NULL if {@link setFirstResult} was not applied to this query builder. * * @return integer The position of the first result. */ public function getFirstResult() { return $this->qb->getFirstResult(); }