Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
src
/
Repository
/
/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/src/Repository/CommandRepository.php
<?php namespace App\Repository; use App\Entity\Command; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; /** * @extends ServiceEntityRepository<Command> * * @method Command|null find($id, $lockMode = null, $lockVersion = null) * @method Command|null findOneBy(array $criteria, array $orderBy = null) * @method Command[] findAll() * @method Command[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class CommandRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Command::class); } public function add(Command $entity, bool $flush = false): void { $this->getEntityManager()->persist($entity); if ($flush) { $this->getEntityManager()->flush(); } } public function remove(Command $entity, bool $flush = false): void { $this->getEntityManager()->remove($entity); if ($flush) { $this->getEntityManager()->flush(); } } // /** // * @return Command[] Returns an array of Command objects // */ // public function findByExampleField($value): array // { // return $this->createQueryBuilder('c') // ->andWhere('c.exampleField = :val') // ->setParameter('val', $value) // ->orderBy('c.id', 'ASC') // ->setMaxResults(10) // ->getQuery() // ->getResult() // ; // } // public function findOneBySomeField($value): ?Command // { // return $this->createQueryBuilder('c') // ->andWhere('c.exampleField = :val') // ->setParameter('val', $value) // ->getQuery() // ->getOneOrNullResult() // ; // } }