src/OcraDiCompiler/ServiceManager/Di/DiAbstractServiceFactory.php
public function get($name, array $params = array())
    {
        if (null === $this->serviceLocator) {
            throw new DomainException('No ServiceLocator defined, use `createServiceWithName` instead of `get`');
        }

        if (self::USE_SL_BEFORE_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
            return $this->serviceLocator->get($name);
        }

        try {
            return parent::get($name, $params);
        } catch (ClassNotFoundException $e) {
            if (self::USE_SL_AFTER_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
                return $this->serviceLocator->get($name);
            }

            throw new Exception\ServiceNotFoundException(
                sprintf('Service %s was not found in this DI instance', $name),
                null,
                $e
            );
        }
    }
public function get($name, array $params = array())
    {
        if (null === $this->serviceLocator) {
            throw new DomainException('No ServiceLocator defined, use `createServiceWithName` instead of `get`');
        }

        if (self::USE_SL_BEFORE_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
            return $this->serviceLocator->get($name);
        }

        try {
            return parent::get($name, $params);
        } catch (ClassNotFoundException $e) {
            if (self::USE_SL_AFTER_DI === $this->useServiceLocator && $this->serviceLocator->has($name)) {
                return $this->serviceLocator->get($name);
            }

            throw new Exception\ServiceNotFoundException(
                sprintf('Service %s was not found in this DI instance', $name),
                null,
                $e
            );
        }
    }
public function get ( $ name , array $ params = array ( ) ) { if ( null === $ this -> serviceLocator ) { throw new DomainException ( 'No ServiceLocator defined, use `createServiceWithName` instead of `get`' ) ; } if ( self :: USE_SL_BEFORE_DI === $ this -> useServiceLocator && $ this -> serviceLocator -> has ( $ name ) ) { return $ this -> serviceLocator -> get ( $ name ) ; } try { return parent :: get ( $ name , $ params ) ; } catch ( ClassNotFoundException $ e ) { if ( self :: USE_SL_AFTER_DI === $ this -> useServiceLocator && $ this -> serviceLocator -> has ( $ name ) ) { return $ this -> serviceLocator -> get ( $ name ) ; } throw new Exception \ ServiceNotFoundException ( sprintf ( 'Service %s was not found in this DI instance' , $ name ) , null , $ e ) ; } }
Overrides Zend\Di to allow the given serviceLocator's services to be reused by Di itself

{@inheritDoc}
Overrides Zend \ Di to allow the given serviceLocator s services to be reused by Di itself