protected function determineLoaderFromClass($source): LoaderInterface
    {
        foreach ($this->loaders as $key => $loader) {
            if (class_exists($key) && is_a($source, $key)) {
                return $loader;
            }
        }

        $desc = get_class($source) . ' ' . gettype($source);
        throw new NoLoaderException("Don't know how to load configuration from $desc");
    }
protected function determineLoaderFromClass($source): LoaderInterface
    {
        foreach ($this->loaders as $key => $loader) {
            if (class_exists($key) && is_a($source, $key)) {
                return $loader;
            }
        }

        $desc = get_class($source) . ' ' . gettype($source);
        throw new NoLoaderException("Don't know how to load configuration from $desc");
    }
protected function determineLoaderFromClass ( $ source ) : LoaderInterface { foreach ( $ this -> loaders as $ key => $ loader ) { if ( class_exists ( $ key ) && is_a ( $ source , $ key ) ) { return $ loader ; } } $ desc = get_class ( $ source ) . ' ' . gettype ( $ source ) ; throw new NoLoaderException ( "Don't know how to load configuration from $desc" ) ; }
Determine the loader based on the classname of the object

@param object $source
@return LoaderInterface
@throws NoLoaderException
Determine the loader based on the classname of the object