Newer
Older
<?php
namespace App\Repository;
use App\Entity\Restaurant;
use App\Repository\Interface\RestaurantRepositoryInterface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Restaurant>
*
* @method Restaurant|null find($id, $lockMode = null, $lockVersion = null)
* @method Restaurant|null findOneBy(array $criteria, array $orderBy = null)
* @method Restaurant[] findAll()
* @method Restaurant[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class RestaurantRepository extends ServiceEntityRepository implements RestaurantRepositoryInterface
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Restaurant::class);
}
public function getAll(): array
{
return $this->findAll();
}