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;
}
}