public function registerNamespaces($namespaces, $merge = true)
    {
        foreach ($namespaces as $namespace => $path) {
            $path = rtrim($path, '\\/');
            if (DIRECTORY_SEPARATOR === '\\') {
                $namespaces[$namespace] = strtr($path, '\\', '/');
            }
        }

        $this->_namespaces = $merge ? array_merge($this->_namespaces, $namespaces) : $namespaces;

        return $this;
    }
public function registerNamespaces($namespaces, $merge = true)
    {
        foreach ($namespaces as $namespace => $path) {
            $path = rtrim($path, '\\/');
            if (DIRECTORY_SEPARATOR === '\\') {
                $namespaces[$namespace] = strtr($path, '\\', '/');
            }
        }

        $this->_namespaces = $merge ? array_merge($this->_namespaces, $namespaces) : $namespaces;

        return $this;
    }
public function registerNamespaces ( $ namespaces , $ merge = true ) { foreach ( $ namespaces as $ namespace => $ path ) { $ path = rtrim ( $ path , '\\/' ) ; if ( DIRECTORY_SEPARATOR === '\\' ) { $ namespaces [ $ namespace ] = strtr ( $ path , '\\' , '/' ) ; } } $ this -> _namespaces = $ merge ? array_merge ( $ this -> _namespaces , $ namespaces ) : $ namespaces ; return $ this ; }
Register namespaces and their related directories

@param array $namespaces
@param bool  $merge

@return static
Register namespaces and their related directories