Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / View / Helper / Service / IdentityFactory.php
blobf7b1750a5b798e5e16566f15e44f4cbd9512496a
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\View\Helper\Service;
12 use Zend\ServiceManager\FactoryInterface;
13 use Zend\ServiceManager\ServiceLocatorInterface;
14 use Zend\View\Helper\Identity;
16 class IdentityFactory implements FactoryInterface
18 /**
19 * {@inheritDoc}
21 * @return \Zend\View\Helper\Identity
23 public function createService(ServiceLocatorInterface $serviceLocator)
25 $services = $serviceLocator->getServiceLocator();
26 $helper = new Identity();
27 if ($services->has('Zend\Authentication\AuthenticationService')) {
28 $helper->setAuthenticationService($services->get('Zend\Authentication\AuthenticationService'));
30 return $helper;