set all namespace prefixes and their base directories; overwrites
existing prefixes

@param array $prefixes: associative array of namespace prefixes and their base directories

@return void
341496
public function setPrefixes(array $prefixes) {
		$this->prefixes = [];
		foreach ($prefixes as $prefix => $baseDir) {
			$this->addPrefix($prefix, $baseDir);
		}
	}
397744
public function setParentClasses(array $classNames)
    {
        $this->parentClasses = $classNames;
        if (count($classNames) > 0) {
            $this->rootXmlEntityName = array_pop($classNames);
        }
    }
678384
public function setNamespaces(array $namespaces)
    {
        $this->namespaces = array();

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

        return $this;
    }
389209
public function addNamePrefix(string $prefix)
    {
        $prefixedRoutes = [];

        foreach ($this->routes as $name => $route) {
            $prefixedRoutes[$prefix.$name] = $route;
            if (null !== $name = $route->getDefault('_canonical_route')) {
                $route->setDefault('_canonical_route', $prefix.$name);
            }
        }

        $this->routes = $prefixedRoutes;
    }
1292952
public function setLocales(array $locales) {
        $this->locales = [];
        foreach($locales as $loc)
            $this->addLocale($loc);
    }
100769
public function setExtensions( $extensions = array() )
	{
		if( !is_array( $extensions ) )
			throw new InvalidArgumentException( 'Extensions must be given as Array.' );

		$pattern	= "";
		if( count( $extensions ) )
		{
			$extensions	= implode( "|", array_values( $extensions ) );
			$pattern	= '@\.'.$extensions.'$@i';
		}
		$this->pattern	= $pattern;
	}
166340
static public function setNamespaces($nss)
	{
	    static::initNamespace();
	    
	    $nss = (array) $nss;
	    $rnss = [];
	    foreach ($nss as $ns => $path) {
	        if (!is_numeric($ns)) {
	            $ns = static::formatNamespace($ns);
	            static::loader()->setPsr4($ns, $path);
	        } else {
	            $ns = static::formatNamespace($path);
	        }
	        $rnss[] = $ns;
	    }
	    static::$namespaces = array_merge(static::$namespaces, $rnss);
	    return static::$namespaces = array_unique(static::$namespaces);
	}
614069
public static function setPrefix($prefix)
    {
        if (!empty($prefix) && is_string($prefix)) {
            self::$prefix = $prefix;
            return true;
        }

        return false;
    }
229208
protected function setSoapHeaders(array $headers)
    {
        $soapHeaderObjects = array();
        foreach ($headers as $key => $value) {
            $soapHeaderObjects[] = new \SoapHeader(self::SOAP_NAMESPACE, $key, $value);
        }

        $this->soapClient->__setSoapHeaders($soapHeaderObjects);
    }
1140708
public function setAliases(array $aliases)
    {
        $this->aliases = [];

        foreach ($aliases as $alias => $countryCode) {
            $this->aliases[strtoupper($alias)] = strtoupper($countryCode);
        }
    }
850237
public function setIdPrefix(string $prefix = null)
    {
        foreach ((array)$this as $element) {
            if (is_object($element)) {
                $element->setIdPrefix($prefix);
            }
        }
    }
957775
private function prefixPaths (array $paths, string $prefix) : array
    {
        $result = [];

        foreach ($paths as $namespace => $path)
        {
            $result[$namespace] = "{$prefix}/" . trim($path, "/");
        }

        return $result;
    }
364313
public function setPaths($paths, $namespace = self::DEFAULT_NAMESPACE)
    {
        if (! is_array($paths)) {
            $paths = [$paths];
        }
        $this->paths[$namespace] = [];
        foreach ($paths as $path) {
            $this->addPath($path, $namespace);
        }
    }
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));
    }
1334103
public function registerXPathNamespaces($namespaces)
    {
        // Convenience method to add multiple namespaces at once
        foreach ($namespaces as $prefix => $uri) {
            $this->registerXPathNamespace($prefix, $uri);
        }
    }
651167
public function registerXPathNamespace($prefix, $uri)
    {
        $this->el->registerXPathNamespace($prefix, $uri);
        $this->namespaces[$prefix] = $uri;
    }
1109960
protected function clearDeferredByPrefixes(array $prefixes): void
    {
        $deferred = AdapterUtil::getPropertyValue($this, 'deferred');

        foreach ($prefixes as $prefix) {
            foreach ($deferred as $key => $value) {
                if ('' === $prefix || 0 === strpos($key, $prefix)) {
                    unset($deferred[$key]);
                }
            }
        }

        AdapterUtil::setPropertyValue($this, 'deferred', $deferred);
    }