public static function init($configuration = array())
    {
        $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array();
        $serviceManager = new ServiceManager(new ServiceManagerConfig($smConfig));
        $serviceManager->setService('ApplicationConfig', $configuration);
        $serviceManager->get('ModuleManager')->loadModules();
        return $serviceManager->get('Application')->bootstrap();
    }
public static function init($configuration = array())
    {
        $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array();
        $serviceManager = new ServiceManager(new ServiceManagerConfig($smConfig));
        $serviceManager->setService('ApplicationConfig', $configuration);
        $serviceManager->get('ModuleManager')->loadModules();
        return $serviceManager->get('Application')->bootstrap();
    }
public static function init ( $ configuration = array ( ) ) { $ smConfig = isset ( $ configuration [ 'service_manager' ] ) ? $ configuration [ 'service_manager' ] : array ( ) ; $ serviceManager = new ServiceManager ( new ServiceManagerConfig ( $ smConfig ) ) ; $ serviceManager -> setService ( 'ApplicationConfig' , $ configuration ) ; $ serviceManager -> get ( 'ModuleManager' ) -> loadModules ( ) ; return $ serviceManager -> get ( 'Application' ) -> bootstrap ( ) ; }
Static method for quick and easy initialization of the Application.

If you use this init() method, you cannot specify a service with the
name of 'ApplicationConfig' in your service manager config. This name is
reserved to hold the array from application.config.php.

The following services can only be overridden from application.config.php:

- ModuleManager
- SharedEventManager
- EventManager & Zend\EventManager\EventManagerInterface

All other services are configured after module loading, thus can be
overridden by modules.

@param array $configuration
@return Application
Static method for quick and easy initialization of the Application .