Adds Namespace Prefixes.

@param array<string, string> $prefixes
357859
public function addNamespacePrefixes(array $prefixes) : void
    {
        $this->prefixes = array_merge($this->prefixes, $prefixes);
        $this->paths    = array_merge($this->paths, array_keys($prefixes));
    }
689649
public function addNamespace( $prefix, $namespace )
	{
		if ( empty( $namespace ) )
		{
			throw new ArgumentOutOfRangeException( "The $namespace parameter to addNamespace cannot be null or empty" );
		}

		if ( substr( $prefix, 0, 5 ) == "xmlns" )
		{
			$prefix = substr( $prefix, 5 );
		}

		if ( strlen( $prefix ) > 0 && $prefix[0] == ":" )
		{
			$prefix = substr( $prefix, 1 );
		}

		if ( empty( $prefix) && empty( $this->defaultNamespace ) )
		{
			$this->defaultNamespace = $namespace;
		}

		$this->namespaces[ $prefix ] = $namespace;
	}
1023148
public function attachNamespace($namespace, $paths)
    {
        if (isset($this->namespaces[$namespace])) {
            if (is_array($paths)) {
                $this->namespaces[$namespace] = array_merge($this->namespaces[$namespace], $paths);
            } else {
                $this->namespaces[$namespace][] = $paths;
            }
        } else {
            $this->namespaces[$namespace] = (array) $paths;
        }

        return $this;
    }
935029
public function prefix(string $prefix) : void
    {
        parent::prefix($prefix);
        $this->element->prefix($prefix);
    }
760545
public static function setNamespaces($namespaces)
    {
        $called = get_called_class();

        if (!$namespaces instanceof PriorityQueue) {
            $namespaces = new PriorityQueue();
        }

        static::$namespaces[$called] = $namespaces;
    }
1197420
public function registerNamespaces(array $namespaces, $prepend = false) {
		foreach ($namespaces as $namespace => $path) {
			$this->registerNamespace($namespace, $path, $prepend);
		}
		
		return $this;
	}
678384
public function setNamespaces(array $namespaces)
    {
        $this->namespaces = array();

        foreach ($namespaces as $prefix => $uri) {
            $this->addNamespace($uri, $prefix);
        }

        return $this;
    }
860734
public function setPrefix(string $prefix)
    {
        foreach ($this->caches as $cache) {
            $cache->setPrefix($prefix);
        }
    }
262541
public function addNamespace($prefix, $path)
    {
        // Normalize namespace prefix
        $prefix = trim($prefix, '\\');

        // Normalize the base directory with a trailing separator
        $path = rtrim($path, '/') . DIRECTORY_SEPARATOR;
        $path = rtrim($path, DIRECTORY_SEPARATOR);

        $this->namespaces[$prefix] = $path;

        return $this;
    }
742743
def add_prefixes(self, nsmap: Dict[str, Namespace]) -> None:
        
        [self._g.bind(e[0], e[1]) for e in nsmap.items()]
1121484
protected function addHeaders(array $headers)
    {
        foreach ($headers as $key => $val) {
            $normalized = strtolower($key);
            $this->headers[$key] = (array)$val;
            $this->headerNames[$normalized] = $key;
        }
    }
833858
public function setPathPrefix($prefix)
    {
        parent::setPathPrefix($prefix);
        if (null === $this->pathPrefix) {
            $this->pathPrefix = $this->pathSeparator;
        }
    }
1029122
protected function prefixValue(&$key)
	{
		if (null === ($version = $this->namespaceVersion)) {
			$version = $this->getNamespaceVersion();
		}

		// namespace#[version]#key
		$key = $this->namespace . self::SEPARATOR .
			$version . self::SEPARATOR . $key;
	}
495094
public function set($prefix, $paths) {
		if (!$prefix) {
			$this->fallbackDirs = (array) $paths;
			return;
		}

		$this->prefixes[$prefix] = (array) $paths;
	}
10243
public function setPrefix($prefix = null)
    {
        $prefix = trim($prefix, '/');

        $this->prefix = ($prefix) ? trim($prefix, '/') . '/' : '';
    }
868539
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;
    }
219591
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));
    }