<?php
namespace App\Repository;
use App\Entity\ProdViews;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<ProdViews>
*
* @method ProdViews|null find($id, $lockMode = null, $lockVersion = null)
* @method ProdViews|null findOneBy(array $criteria, array $orderBy = null)
* @method ProdViews[] findAll()
* @method ProdViews[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ProdViewsRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ProdViews::class);
}
public function add(ProdViews $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(ProdViews $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
}