public static function createFromUri($uri)
    {
        foreach (static::$loaders as $loader) {
            if ($loader::canLoad($uri)) {
                return static::getLoader($loader);
            }
        }

        throw new FailedToLoadConfigException(
            sprintf(
                _('Could not find a suitable loader for URI "%1$s".'),
                $uri
            )
        );
    }
public static function createFromUri($uri)
    {
        foreach (static::$loaders as $loader) {
            if ($loader::canLoad($uri)) {
                return static::getLoader($loader);
            }
        }

        throw new FailedToLoadConfigException(
            sprintf(
                _('Could not find a suitable loader for URI "%1$s".'),
                $uri
            )
        );
    }
public static function createFromUri ( $ uri ) { foreach ( static :: $ loaders as $ loader ) { if ( $ loader :: canLoad ( $ uri ) ) { return static :: getLoader ( $ loader ) ; } } throw new FailedToLoadConfigException ( sprintf ( _ ( 'Could not find a suitable loader for URI "%1$s".' ) , $ uri ) ) ; }
Create a new Loader from an URI.

@since 0.4.0

@param string $uri URI of the resource to create a loader for.

@return LoaderInterface Loader that is able to load the given URI.
@throws FailedToLoadConfigException If no suitable loader was found.
Create a new Loader from an URI .