20 lines
482 B
PHP
20 lines
482 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Service;
|
|
|
|
use Doctrine\ORM\EntityManager;
|
|
use DoctrineExpressiveModule\Hydrator\DoctrineObject;
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
class JudgeManagerFactory
|
|
{
|
|
public function __invoke(ContainerInterface $container): JudgeManager
|
|
{
|
|
$entityManager = $container->get(EntityManager::class);
|
|
$hydrator = $container->get(DoctrineObject::class);
|
|
return new JudgeManager($entityManager, $hydrator);
|
|
}
|
|
}
|