deblan.io-murph/src/Repository/ExportQueueRepository.php
Simon Vieille 9dc3272d40
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
[wip] mastodon integration
2023-07-27 18:28:25 +02:00

67 lines
1.9 KiB
PHP

<?php
namespace App\Repository;
use App\Entity\ExportQueue;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<ExportQueue>
*
* @method ExportQueue|null find($id, $lockMode = null, $lockVersion = null)
* @method ExportQueue|null findOneBy(array $criteria, array $orderBy = null)
* @method ExportQueue[] findAll()
* @method ExportQueue[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ExportQueueRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ExportQueue::class);
}
public function add(ExportQueue $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(ExportQueue $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return ExportQueue[] Returns an array of ExportQueue objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('e')
// ->andWhere('e.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('e.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?ExportQueue
// {
// return $this->createQueryBuilder('e')
// ->andWhere('e.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}