public static function createServiceManager(array $config = [])
    {
        $serviceManager = new ServiceManager(new Config($config));

        $serviceManager->addInitializer(
            function ($instance, ServiceLocatorInterface $serviceLocator) {
                if ($instance instanceof ModelManagerAwareInterface) {
                    $instance->setModelManager($serviceLocator->get('modelmanager'));
                }
            }
        );

        $serviceManager->addInitializer(
            function ($instance, ServiceLocatorInterface $serviceLocator) {
                if ($instance instanceof ServiceLocatorAwareInterface) {
                    $instance->setServiceLocator($serviceLocator);
                }
            }
        );

        return $serviceManager;
    }
public static function createServiceManager(array $config = [])
    {
        $serviceManager = new ServiceManager(new Config($config));

        $serviceManager->addInitializer(
            function ($instance, ServiceLocatorInterface $serviceLocator) {
                if ($instance instanceof ModelManagerAwareInterface) {
                    $instance->setModelManager($serviceLocator->get('modelmanager'));
                }
            }
        );

        $serviceManager->addInitializer(
            function ($instance, ServiceLocatorInterface $serviceLocator) {
                if ($instance instanceof ServiceLocatorAwareInterface) {
                    $instance->setServiceLocator($serviceLocator);
                }
            }
        );

        return $serviceManager;
    }
public static function createServiceManager ( array $ config = [ ] ) { $ serviceManager = new ServiceManager ( new Config ( $ config ) ) ; $ serviceManager -> addInitializer ( function ( $ instance , ServiceLocatorInterface $ serviceLocator ) { if ( $ instance instanceof ModelManagerAwareInterface ) { $ instance -> setModelManager ( $ serviceLocator -> get ( 'modelmanager' ) ) ; } } ) ; $ serviceManager -> addInitializer ( function ( $ instance , ServiceLocatorInterface $ serviceLocator ) { if ( $ instance instanceof ServiceLocatorAwareInterface ) { $ instance -> setServiceLocator ( $ serviceLocator ) ; } } ) ; return $ serviceManager ; }
Creates a service manager instnace

@param  array                               $config
@return \Zend\ServiceManager\ServiceManager
Creates a service manager instnace