Current path: home/webdevt/cryptoimpot.fr/module/User/src/Service/Factory/
?? Go up: /home/webdevt/cryptoimpot.fr/module/User/src/Service
<?php
namespace User\Service\Factory;
use Interop\Container\ContainerInterface;
use User\Service\UserManager;
/**
* This is the factory class for UserManager service. The purpose of the factory
* is to instantiate the service and pass it dependencies (inject dependencies).
*/
class UserManagerFactory
{
/**
* This method creates the UserManager service and returns its instance.
*/
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$entityManager = $container->get('doctrine.entitymanager.orm_default');
$viewRenderer = $container->get('ViewRenderer');
$config = $container->get('Config');
return new UserManager($entityManager, $viewRenderer, $config);
}
}