<?php

namespace App\Service;

use App\Entity\Snip;
use App\Service\SnipContent\SnipContentService;
use Doctrine\ORM\EntityManagerInterface;

readonly class SnipServiceFactory
{
    public function __construct(
        private EntityManagerInterface $em,
    ) {}

    public function create(Snip $snip): SnipContentService
    {
        return new SnipContentService($snip, $this->em);
    }
}