src/OcraDiCompiler/Mvc/Service/DiFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');

        ErrorHandler::start();
        $compiledInstantiators = include $config['ocra_di_compiler']['compiled_di_instantiator_filename'];
        ErrorHandler::stop();

        if (!is_array($compiledInstantiators)) {
            $di = $this->createDi($config);
            $this->compileDi($di, $config);
            $this->getDiDefinitions($config, $di);
            $compiledInstantiators = include $config['ocra_di_compiler']['compiled_di_instantiator_filename'];
        }

        $di = new CompiledInstantiatorsDi();

        $this->configureDi($di, $config);
        $di->setCompiledInstantiators($compiledInstantiators);
        $this->registerAbstractFactory($serviceLocator, $di);

        return $di;
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');

        ErrorHandler::start();
        $compiledInstantiators = include $config['ocra_di_compiler']['compiled_di_instantiator_filename'];
        ErrorHandler::stop();

        if (!is_array($compiledInstantiators)) {
            $di = $this->createDi($config);
            $this->compileDi($di, $config);
            $this->getDiDefinitions($config, $di);
            $compiledInstantiators = include $config['ocra_di_compiler']['compiled_di_instantiator_filename'];
        }

        $di = new CompiledInstantiatorsDi();

        $this->configureDi($di, $config);
        $di->setCompiledInstantiators($compiledInstantiators);
        $this->registerAbstractFactory($serviceLocator, $di);

        return $di;
    }
public function createService ( ServiceLocatorInterface $ serviceLocator ) { $ config = $ serviceLocator -> get ( 'Config' ) ; ErrorHandler :: start ( ) ; $ compiledInstantiators = include $ config [ 'ocra_di_compiler' ] [ 'compiled_di_instantiator_filename' ] ; ErrorHandler :: stop ( ) ; if ( ! is_array ( $ compiledInstantiators ) ) { $ di = $ this -> createDi ( $ config ) ; $ this -> compileDi ( $ di , $ config ) ; $ this -> getDiDefinitions ( $ config , $ di ) ; $ compiledInstantiators = include $ config [ 'ocra_di_compiler' ] [ 'compiled_di_instantiator_filename' ] ; } $ di = new CompiledInstantiatorsDi ( ) ; $ this -> configureDi ( $ di , $ config ) ; $ di -> setCompiledInstantiators ( $ compiledInstantiators ) ; $ this -> registerAbstractFactory ( $ serviceLocator , $ di ) ; return $ di ; }
Generates a compiled Di proxy to be used as a replacement for \Zend\Di\Di

@param ServiceLocatorInterface $serviceLocator
@return Di
Generates a compiled Di proxy to be used as a replacement for \ Zend \ Di \ Di