Current path: home/webdevt/cryptoimpot.fr/module/Application/src/Controller/Factory/
?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/src/Controller
<?php
namespace Application\Controller\Factory;
use Psr\Container\ContainerInterface;
use User\Controller\AuthController;
use Laminas\ServiceManager\Factory\FactoryInterface;
use User\Service\AuthManager;
use User\Service\UserManager;
/**
* This is the factory for AuthController. Its purpose is to instantiate the controller
* and inject dependencies into its constructor.
*/
class AccueilControllerFactory
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$entityManager = $container->get('doctrine.entitymanager.orm_default');
$authManager = $container->get(AuthManager::class);
$userManager = $container->get(UserManager::class);
$config = $container->get('config');
$viewRenderer = $container->get('ViewRenderer');
return new \Application\Controller\AccueilController($entityManager, $authManager, $userManager, $config, $viewRenderer);
}
}