public function map($prefix, $paths)
    {
        $prefix = ltrim($prefix, '\\');
        $paths = (array) $paths;

        if (!isset($this->map[$prefix])) {
            $this->map[$prefix] = array();
        }

        foreach ($paths as $path) {
            $this->map[$prefix][] = rtrim($path, '\\/') . DIRECTORY_SEPARATOR;
        }

        return $this;
    }
public function map($prefix, $paths)
    {
        $prefix = ltrim($prefix, '\\');
        $paths = (array) $paths;

        if (!isset($this->map[$prefix])) {
            $this->map[$prefix] = array();
        }

        foreach ($paths as $path) {
            $this->map[$prefix][] = rtrim($path, '\\/') . DIRECTORY_SEPARATOR;
        }

        return $this;
    }
public function map ( $ prefix , $ paths ) { $ prefix = ltrim ( $ prefix , '\\' ) ; $ paths = ( array ) $ paths ; if ( ! isset ( $ this -> map [ $ prefix ] ) ) { $ this -> map [ $ prefix ] = array ( ) ; } foreach ( $ paths as $ path ) { $ this -> map [ $ prefix ] [ ] = rtrim ( $ path , '\\/' ) . DIRECTORY_SEPARATOR ; } return $ this ; }
Maps a namespace prefix to one or more base directory paths.

This method is used to map a single namespace to one or more directory
paths. The `$paths` argument may be a single directory path (string),
or an array of directory paths.

$loader->map('Example\\Prefix', '/single/dir/path');

$loader->map(
'Example\\Prefix',
array(
'/one/directory/path',
'/another/directory/path',
)
);

You may also chain calls to this method together:

$psr4->map(...)->map(...);

@param string       $prefix The namespace prefix.
@param array|string $paths  The base directory path(s).

@return Loader The instance of this class.

@api
Maps a namespace prefix to one or more base directory paths .