Doctrine\Common\Persistence\ObjectRepository::findBy PHP Method

findBy() public method

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
return array The objects.
    public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);

Usage Example

示例#1
0
文件: User.php 项目: Indigo1337/c4d
 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