public function addNamespace($prefix, $baseDir)
    {
        $prefix = trim($prefix, '\\').'\\';
        $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
        if (!isset($this->namespaceMap[$prefix])) {
            $this->namespaceMap[$prefix] = [];
        }
        array_push($this->namespaceMap[$prefix], str_replace('$path', $this->basePath, $baseDir));
    }
public function addNamespace($prefix, $baseDir)
    {
        $prefix = trim($prefix, '\\').'\\';
        $baseDir = rtrim($baseDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
        if (!isset($this->namespaceMap[$prefix])) {
            $this->namespaceMap[$prefix] = [];
        }
        array_push($this->namespaceMap[$prefix], str_replace('$path', $this->basePath, $baseDir));
    }
public function addNamespace ( $ prefix , $ baseDir ) { $ prefix = trim ( $ prefix , '\\' ) . '\\' ; $ baseDir = rtrim ( $ baseDir , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; if ( ! isset ( $ this -> namespaceMap [ $ prefix ] ) ) { $ this -> namespaceMap [ $ prefix ] = [ ] ; } array_push ( $ this -> namespaceMap [ $ prefix ] , str_replace ( '$path' , $ this -> basePath , $ baseDir ) ) ; }
Registers a PSR-4 namespace.

@param string $prefix
@param string $baseDir
Registers a PSR - 4 namespace .