public static function getDependence(FileManager $fileManager)
    {
        if (null === self::$serviceManager) {
            $config = self::findConfigFile($fileManager);

            try {
                self::$serviceManager = Application::init(
                    $fileManager->includeFile($config)
                )->getServiceManager();
            } catch(RuntimeException $e) {
                throw new EnvironnementResolverException($e->getMessage());
            } catch (ExceptionInterface $e) {
                throw new EnvironnementResolverException(
                    sprintf(
                        '%s. Config loaded %s',
                        $e->getMessage(),
                        $config
                    )
                );
            }
        }

        return self::$serviceManager;
    }
public static function getDependence(FileManager $fileManager)
    {
        if (null === self::$serviceManager) {
            $config = self::findConfigFile($fileManager);

            try {
                self::$serviceManager = Application::init(
                    $fileManager->includeFile($config)
                )->getServiceManager();
            } catch(RuntimeException $e) {
                throw new EnvironnementResolverException($e->getMessage());
            } catch (ExceptionInterface $e) {
                throw new EnvironnementResolverException(
                    sprintf(
                        '%s. Config loaded %s',
                        $e->getMessage(),
                        $config
                    )
                );
            }
        }

        return self::$serviceManager;
    }
public static function getDependence ( FileManager $ fileManager ) { if ( null === self :: $ serviceManager ) { $ config = self :: findConfigFile ( $ fileManager ) ; try { self :: $ serviceManager = Application :: init ( $ fileManager -> includeFile ( $ config ) ) -> getServiceManager ( ) ; } catch ( RuntimeException $ e ) { throw new EnvironnementResolverException ( $ e -> getMessage ( ) ) ; } catch ( ExceptionInterface $ e ) { throw new EnvironnementResolverException ( sprintf ( '%s. Config loaded %s' , $ e -> getMessage ( ) , $ config ) ) ; } } return self :: $ serviceManager ; }
Check if we are in zf2 env

@param  FileManager                         $fileManager
@throws RuntimeException
@throws EnvironnementResolverException
@return \Zend\ServiceManager\ServiceManager
Check if we are in zf2 env