public function registerLoader(InputLoaderInterface $loader) {
        foreach ($loader->getSupportedMimeTypes() as $mime => $extensions) {
            if (!isset($this->loaders[$mime])) {
                $this->loaders[$mime] = [];
            }

            if (!isset($this->mimeTypeToExtension[$mime])) {
                $this->mimeTypeToExtension[$mime] = [];
            }

            if (!is_array($extensions)) {
                $extensions = [$extensions];
            }

            foreach ($extensions as $extension) {
                $this->mimeTypeToExtension[$mime][] = $extension;
            }

            array_unshift($this->loaders[$mime], $loader);
        }

        return $this;
    }