mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-05 23:03:11 +08:00
16 lines
409 B
PHP
16 lines
409 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Common\Doctrine;
|
|
|
|
use Doctrine\ORM\EntityManager;
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
class ReopeningEntityManagerDelegator
|
|
{
|
|
public function __invoke(ContainerInterface $container, string $name, callable $callback): ReopeningEntityManager
|
|
{
|
|
return new ReopeningEntityManager($callback(), [EntityManager::class, 'create']);
|
|
}
|
|
}
|