mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 00:40:52 +00:00
25 lines
515 B
PHP
25 lines
515 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Rector\DependencyInjection;
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
final class ContainerFactory
|
|
{
|
|
public function create(): ContainerInterface
|
|
{
|
|
$appKernel = new AppKernel;
|
|
$appKernel->boot();
|
|
|
|
return $appKernel->getContainer();
|
|
}
|
|
|
|
public function createWithConfig(string $config): ContainerInterface
|
|
{
|
|
$appKernel = new AppKernel($config);
|
|
$appKernel->boot();
|
|
|
|
return $appKernel->getContainer();
|
|
}
|
|
}
|