Doctrine\ODM\MongoDB\DocumentRepository::findAll PHP Method

findAll() public method

Finds all documents in the repository.
public findAll ( ) : array
return array
    public function findAll()
    {
        return $this->findBy(array());
    }

Usage Example

Beispiel #1
0
 /**
  * @return DomainEvent[]
  */
 public function getAll()
 {
     $events = [];
     /** @var $storedEvent StoredEvent */
     $storedEvents = $this->repository->findAll();
     foreach ($storedEvents as $storedEvent) {
         $events[] = $storedEvent->getEvent();
     }
     return $events;
 }
All Usage Examples Of Doctrine\ODM\MongoDB\DocumentRepository::findAll