chore: complete update
This commit is contained in:
22
src/Domain/Media/ImageVariantRepository.php
Normal file
22
src/Domain/Media/ImageVariantRepository.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\Media;
|
||||
|
||||
use App\Framework\Database\EntityManager;
|
||||
|
||||
final class ImageVariantRepository
|
||||
{
|
||||
public function __construct(
|
||||
private EntityManager $entityManager
|
||||
){}
|
||||
|
||||
public function save(ImageVariant $imageVariant): void
|
||||
{
|
||||
$this->entityManager->save($imageVariant);
|
||||
}
|
||||
|
||||
public function findByFilename(string $filename): ?ImageVariant {
|
||||
return $this->entityManager->findOneBy(ImageVariant::class, ['filename' => $filename]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user