public static function fromEnv($configFilename, Version $version)
    {
        if (null === $configFilename) {
            $configFilename = getenv('ZFILE') ? getenv('ZFILE') : 'z.yml';
        }

        return new self(
            $configFilename,
            new PathDefaultFileLocator('ZPATH', array(getcwd(), getenv('HOME') . '/.config/z')),
            new FileLoader(
                new PathDefaultFileLocator(
                    'ZPLUGINPATH',
                    array(ZPREFIX . '/vendor/zicht/z-plugins/', getcwd())
                ),
                $version
            )
        );
    }
public static function fromEnv($configFilename, Version $version)
    {
        if (null === $configFilename) {
            $configFilename = getenv('ZFILE') ? getenv('ZFILE') : 'z.yml';
        }

        return new self(
            $configFilename,
            new PathDefaultFileLocator('ZPATH', array(getcwd(), getenv('HOME') . '/.config/z')),
            new FileLoader(
                new PathDefaultFileLocator(
                    'ZPLUGINPATH',
                    array(ZPREFIX . '/vendor/zicht/z-plugins/', getcwd())
                ),
                $version
            )
        );
    }
public static function fromEnv ( $ configFilename , Version $ version ) { if ( null === $ configFilename ) { $ configFilename = getenv ( 'ZFILE' ) ? getenv ( 'ZFILE' ) : 'z.yml' ; } return new self ( $ configFilename , new PathDefaultFileLocator ( 'ZPATH' , array ( getcwd ( ) , getenv ( 'HOME' ) . '/.config/z' ) ) , new FileLoader ( new PathDefaultFileLocator ( 'ZPLUGINPATH' , array ( ZPREFIX . '/vendor/zicht/z-plugins/' , getcwd ( ) ) ) , $ version ) ) ; }
Create the configuration loader based the current shell environment variables.

@param string $configFilename
@param Version $version
@return ConfigurationLoader
@codeCoverageIgnore
Create the configuration loader based the current shell environment variables .