Neos\Flow\Persistence\Doctrine\QueryResult::toArray PHP Méthode

toArray() public méthode

Returns an array with the objects in the result set
public toArray ( ) : array
Résultat array
    public function toArray()
    {
        $this->initialize();
        return $this->rows;
    }

Usage Example

 /**
  * @test
  */
 public function countCountsQueryResultDirectlyIfAlreadyInitialized()
 {
     $this->query->expects($this->never())->method('count');
     $this->queryResult->toArray();
     $this->assertEquals(3, $this->queryResult->count());
 }