Neos\Flow\Persistence\Generic\QueryResult::toArray PHP Метод

toArray() публичный Метод

Returns an array with the objects in the result set
public toArray ( ) : array
Результат array
    public function toArray()
    {
        $this->initialize();
        return iterator_to_array($this);
    }

Usage Example

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