public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appConfig = $serviceLocator;
        $config = array_key_exists($appConfig['view_helper_date']) ? $appConfig['view_helper_date'] : array();
        if (array_key_exists('formats', $config)) {
            $this->addFormats($config['formats']);
        }
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appConfig = $serviceLocator;
        $config = array_key_exists($appConfig['view_helper_date']) ? $appConfig['view_helper_date'] : array();
        if (array_key_exists('formats', $config)) {
            $this->addFormats($config['formats']);
        }
    }
public function createService ( ServiceLocatorInterface $ serviceLocator ) { $ appConfig = $ serviceLocator ; $ config = array_key_exists ( $ appConfig [ 'view_helper_date' ] ) ? $ appConfig [ 'view_helper_date' ] : array ( ) ; if ( array_key_exists ( 'formats' , $ config ) ) { $ this -> addFormats ( $ config [ 'formats' ] ) ; } }
Create and configure instance

@see \Zend\ServiceManager\FactoryInterface::createService()
@param ServiceLocatorInterface $serviceLocator
Create and configure instance