Find the namespace of the template being rendered

@param string        $sNamespace         The namespace name

@return void
558271
public function setCurrentNamespace($sNamespace)
    {
        $this->sDirectory = '';
        $this->sExtension = '';
        if(key_exists($sNamespace, $this->aDirectories))
        {
            // Make sure there's only one '/' at the end of the string
            $this->sDirectory = rtrim($this->aDirectories[$sNamespace]['path'], '/') . '/';
            // Make sure there's only one '.' at the beginning of the string
            $this->sExtension = '.' . ltrim($this->aDirectories[$sNamespace]['ext'], '.');
        }
    }
526715
public function findByNamespace($namespace)
    {
        if (!$this->hasPlugin($namespace)) {
            return null;
        }

        $classId = $this->getIdentifier($namespace);

        return $this->plugins[$classId];
    }
1145641
public static function getNamespace($tokens)
    {
        $count = count($tokens);
        $i = 0;
        $namespace = '';
        $namespace_ok = false;
        while ($i < $count) {
            $token = $tokens[$i];
            if (is_array($token) && $token[0] === T_NAMESPACE) {
                // Found namespace declaration
                while (++$i < $count) {
                    if ($tokens[$i] === ';') {
                        $namespace_ok = true;
                        $namespace = trim($namespace);
                        break;
                    }
                    $namespace .= is_array($tokens[$i]) ? $tokens[$i][1] : $tokens[$i];
                }
                break;
            }
            $i++;
        }
        if (!$namespace_ok) {
            return null;
        } else {
            return $namespace;
        }
    }
533128
public function lookupPrefix( $namespace )
	{
		foreach ( $this->namespaces as $prefix => $value )
		{
			if ( strcasecmp( $namespace, $value ) === 0 ) return $prefix;
		}

		return false;
	}
375273
public function setNamespace($namespace)
    {
        $namespace = rtrim(trim($namespace), '\\');

        if ($namespace === $this->namespace) {
            return;
        }

        $this->namespace = $namespace;
        if ($namespace && (!$this->package || $this->packageOverridden) && $this->getBuildProperty('generator.namespaceAutoPackage')) {
            $this->package = str_replace('\\', '.', $namespace);
            $this->packageOverridden = true;
        }
    }
424110
public function registerNamespace(PHPTAL_Namespace $ns)
    {
        $this->namespaces_by_uri[$ns->getNamespaceURI()] = $ns;
        $this->prefix_to_uri[$ns->getPrefix()] = $ns->getNamespaceURI();
        $prefix = strtolower($ns->getPrefix());
        foreach ($ns->getAttributes() as $name => $attribute) {
            $key = $prefix.':'.strtolower($name);
            $this->_dictionary[$key] = $attribute;
        }
    }
680670
public function setNamespace($name)
	{
		$this->config['namespace'] = is_bool($name) ? $name : (string) $name;

		if ($this->config['namespace'] === true)
		{
			$this->config['namespace'] = $this->app ? $app->getName() : false;
		}

		$this->data->setNamespace($this->config['namespace']);
	}
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;
	}
372513
protected function namespaceAttrs($ele) {
        if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) {
            $this->xpath = new \DOMXPath($ele->ownerDocument);
        }

        foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) {
            if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) {
                $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"');
            }
        }
    }
88978
public function filterNamespace( $namespaceName) {
        $FilteredClasses = [];
        foreach( $this->loadedClasses as $loadedClass){
            if( 0 == substr_compare( $loadedClass, $namespaceName, 0, strlen( $namespaceName))){
                $FilteredClasses[] = $loadedClass;
            }
        }
        $this->loadedClasses = $FilteredClasses;
    }
432052
protected function initNamespace(DOMDocument $document, $namespace_prefix = null)
    {
        // @todo: check for conflicting namespace prefixes
        $this->document_namespace = trim($document->documentElement->namespaceURI);
        $namespace_prefix = trim($namespace_prefix);

        if ($this->hasNamespace()) {
            $this->namespace_prefix = empty($namespace_prefix) ? $this->getDefaultNamespacePrefix() : $namespace_prefix;

            $this->registerNamespace(
                $this->namespace_prefix,
                $this->document_namespace
            );
        }
    }
573668
private function setupNamespace($namespace)
	{
		if(!is_null($namespace)) {
			if(!isset($_SESSION[$namespace]) || !is_array($_SESSION[$namespace])) {
				$_SESSION[$namespace] = array();
			}
			$this->data = &$_SESSION[$namespace];
		} else {
			$this->data = &$_SESSION;
		}
	}
927569
private function removeNonSatNSNode(string $namespace)
    {
        foreach ($this->dom()->getElementsByTagNameNS($namespace, '*') as $children) {
            $children->parentNode->removeChild($children);
        }
    }
986491
public function getPrefixForDocumentNamespace( $namespace )
	{
		if ( is_null( $this->cacheDocumentNamespaces ) )
		{
			$this->cacheDocumentNamespaces = array_flip( $this->instance_xml->getDocNamespaces() );
			// If the default namespace is one of the standards ones then the prefix may be missing
			$standardNamespaces = array_flip( XBRL_Constants::$standardPrefixes );
			$docNamespace = array_search( '', $this->cacheDocumentNamespaces );
			if ( $docNamespace )
			{
				if ( isset( $standardNamespaces[ $docNamespace ] ) )
				{
					$this->cacheDocumentNamespaces[ $docNamespace ] = $standardNamespaces[ $docNamespace ];
				}
				else
				{
					// Get the namespace for the respective namespace
					$taxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $docNamespace );
					if ( $taxonomy )
					{
						$this->cacheDocumentNamespaces[ $docNamespace ] = $taxonomy->getPrefix();
					}
				}
			}
		}

		return isset( $this->cacheDocumentNamespaces[ $namespace ] )
			? $this->cacheDocumentNamespaces[ $namespace ]
			: false;
	}
742507
static function initializeReporticoNamespace($namespace)
    {
        $namespace = ReporticoApp::get("session_namespace_key");
        if (isset($_SESSION[$namespace])) {
            unset($_SESSION[$namespace]);
        }

        ReporticoSession::setReporticoSessionParam("awaiting_initial_defaults", true);
        ReporticoSession::setReporticoSessionParam("firsttimeIn", true);
    }
121470
public static function delete(string $name, string $namespace = '*'): void
    {
        self::initialize();
        if (isset($_SESSION[$namespace][$name])) {
            unset($_SESSION[$namespace][$name]);
            if (count($_SESSION[$namespace]) === 0) {
                unset($_SESSION[$namespace]);
            }
        }
    }
811061
public function namespace($key, $value){
		if(!array_key_exists($key, $this->namespaces))
			$this->namespaces[$key] = $value;
	}