mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\MainBundle\Repository;
|
|
|
|
use Chill\MainBundle\Entity\Scope;
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
use Doctrine\ORM\EntityRepository;
|
|
use Doctrine\Persistence\ObjectRepository;
|
|
|
|
final class ScopeRepository implements ObjectRepository
|
|
{
|
|
private EntityRepository $repository;
|
|
|
|
public function __construct(EntityManagerInterface $entityManager)
|
|
{
|
|
$this->repository = $entityManager->getRepository(Scope::class);
|
|
}
|
|
|
|
public function find($id, $lockMode = null, $lockVersion = null): ?Scope
|
|
{
|
|
return $this->repository->find($id, $lockMode, $lockVersion);
|
|
}
|
|
|
|
public function findOneBy(array $criteria, array $orderBy = null): ?Scope
|
|
{
|
|
return $this->repository->findOneBy($criteria, $orderBy);
|
|
}
|
|
|
|
/**
|
|
* @return Scope[]
|
|
*/
|
|
public function findAll(): array
|
|
{
|
|
return $this->repository->findAll();
|
|
}
|
|
|
|
/**
|
|
* @return Scope[]
|
|
*/
|
|
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
|
|
{
|
|
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
|
}
|
|
|
|
public function getClassName() {
|
|
return Scope::class;
|
|
}
|
|
}
|