public static function getLoader($loaderClass)
    {
        try {
            if (! array_key_exists($loaderClass, static::$loaderInstances)) {
                static::$loaderInstances[$loaderClass] = new $loaderClass;
            }

            return static::$loaderInstances[$loaderClass];
        } catch (Exception $exception) {
            throw new FailedToLoadConfigException(
                sprintf(
                    _('Could not instantiate the requested loader class "%1$s".'),
                    $loaderClass
                )
            );
        }
    }
public static function getLoader($loaderClass)
    {
        try {
            if (! array_key_exists($loaderClass, static::$loaderInstances)) {
                static::$loaderInstances[$loaderClass] = new $loaderClass;
            }

            return static::$loaderInstances[$loaderClass];
        } catch (Exception $exception) {
            throw new FailedToLoadConfigException(
                sprintf(
                    _('Could not instantiate the requested loader class "%1$s".'),
                    $loaderClass
                )
            );
        }
    }
public static function getLoader ( $ loaderClass ) { try { if ( ! array_key_exists ( $ loaderClass , static :: $ loaderInstances ) ) { static :: $ loaderInstances [ $ loaderClass ] = new $ loaderClass ; } return static :: $ loaderInstances [ $ loaderClass ] ; } catch ( Exception $ exception ) { throw new FailedToLoadConfigException ( sprintf ( _ ( 'Could not instantiate the requested loader class "%1$s".' ) , $ loaderClass ) ) ; } }
Get an instance of a specific loader.

The loader is lazily instantiated if needed.

@since 0.4.0

@param string $loaderClass Fully qualified class name of the loader to get.

@return LoaderInterface Instance of the requested loader.
@throws FailedToLoadConfigException If the loader class could not be instantiated.
Get an instance of a specific loader .