Select Git revision
UserProfileFactory.php
-
Bertrand Gauthier authoredBertrand Gauthier authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
UserProfileFactory.php 771 B
<?php
namespace UnicaenAuth\View\Helper;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
/**
* Description of UserProfileFactory
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class UserProfileFactory implements FactoryInterface
{
public function createService(ServiceLocatorInterface $helperPluginManager)
{
return $this->__invoke($helperPluginManager, '?');
}
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$serviceLocator = $container;
$authUserContext = $serviceLocator->get('authUserContext');
return new UserProfile($authUserContext);
}
}