src/View/Helper/Dojo.php
public function createService(ServiceLocatorInterface $viewHelperManager)
    {
        $serviceLocator = $viewHelperManager->getServiceLocator();
        $config = $serviceLocator->has('config') ? $serviceLocator->get('config') : array();
        if (isset($config['dojo'])) {
            $this->config($config['dojo']);
        }
        
        $application = $serviceLocator->get('application');
        $debug = $application->getRequest()->getQuery('debug'); 
        if ($debug !== null) {
            $this->setDebug($debug == 'true');
        }
        
        return $this;
    }
public function createService(ServiceLocatorInterface $viewHelperManager)
    {
        $serviceLocator = $viewHelperManager->getServiceLocator();
        $config = $serviceLocator->has('config') ? $serviceLocator->get('config') : array();
        if (isset($config['dojo'])) {
            $this->config($config['dojo']);
        }
        
        $application = $serviceLocator->get('application');
        $debug = $application->getRequest()->getQuery('debug'); 
        if ($debug !== null) {
            $this->setDebug($debug == 'true');
        }
        
        return $this;
    }
public function createService ( ServiceLocatorInterface $ viewHelperManager ) { $ serviceLocator = $ viewHelperManager -> getServiceLocator ( ) ; $ config = $ serviceLocator -> has ( 'config' ) ? $ serviceLocator -> get ( 'config' ) : array ( ) ; if ( isset ( $ config [ 'dojo' ] ) ) { $ this -> config ( $ config [ 'dojo' ] ) ; } $ application = $ serviceLocator -> get ( 'application' ) ; $ debug = $ application -> getRequest ( ) -> getQuery ( 'debug' ) ; if ( $ debug !== null ) { $ this -> setDebug ( $ debug == 'true' ) ; } return $ this ; }
Create and configure service

@see \Zend\ServiceManager\FactoryInterface::createService()
@param ServiceLocatorInterface $viewHelperManager
@return \Spork\View\Helper\Dojo
Create and configure service