protected function getLoader(string $path): LoaderInterface
    {
        if (null === $this->loaderClass) {
            throw new RuntimeException('You must implement '.__METHOD__.' or pass the loader class to the constructor');
        }

        return new $this->loaderClass($path);
    }