Doctrine\Common\Persistence\ObjectRepository::findBy PHP Метод

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

Optionally sorting and limiting details can be passed. An implementation may throw an UnexpectedValueException if certain values of the sorting or limiting details are not supported.
public findBy ( array $criteria, array $orderBy = null, integer | null $limit = null, integer | null $offset = null ) : array
$criteria array
$orderBy array
$limit integer | null
$offset integer | null
Результат array The objects.
    public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);

Usage Example

Пример #1
0
 public function findAll()
 {
     if (false === $this->authorizationService->isGranted('user.admin')) {
         throw new UnauthorizedException('Insufficient Permissions');
     }
     return $this->objectRepository->findBy([], ['email' => 'ASC']);
 }
All Usage Examples Of Doctrine\Common\Persistence\ObjectRepository::findBy