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;
    }
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;
    }
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 ; }
Register a specific input loader for the manager to use.

@param InputLoaderInterface $loader InputLoader to register
@return self
Register a specific input loader for the manager to use .