Skip to content
Snippets Groups Projects
Select Git revision
  • a1f84f10ba68f7aff035e952d92caef7cd661b1d
  • master default protected
  • b24
  • ll-workflow
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • b22
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
  • 24.0-beta12
  • 24.0-beta11
41 results

bdd-make-update-diff.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    AbstractService.php 1.21 KiB
    <?php
    
    namespace UnicaenAuth\Service;
    
    use UnicaenApp\Service\EntityManagerAwareTrait;
    use UnicaenAuth\Options\ModuleOptions;
    use Zend\ServiceManager\ServiceLocatorAwareInterface;
    use Zend\ServiceManager\ServiceLocatorAwareTrait;
    
    abstract class AbstractService implements ServiceLocatorAwareInterface
    {
        use ServiceLocatorAwareTrait;
        use EntityManagerAwareTrait;
    
        /**
         * @var \BjyAuthorize\Service\Authorize
         */
        private $serviceAuthorize;
    
        /**
         * @return \UnicaenAuth\Service\AuthorizeService
         */
        protected function getServiceAuthorize()
        {
            if (!$this->serviceAuthorize) {
                $this->serviceAuthorize = $this->getServiceLocator()->get('BjyAuthorize\Service\Authorize');
            }
    
            return $this->serviceAuthorize;
        }
    
        /**
         * @return \Doctrine\ORM\EntityManager
         */
        public function getEntityManager()
        {
            if (!$this->entityManager) {
                $moduleOptions = $this->getServiceLocator()->get('unicaen-auth_module_options');
                /* @var $moduleOptions ModuleOptions */
                $this->entityManager = $this->getServiceLocator()->get($moduleOptions->getEntityManagerName());
            }
    
            return $this->entityManager;
        }
    }