When the full qualified namespace is empty but the class and namespace are set, we concat these two values to the
full qualified namespace

@return string
433130
public function getFullQualifiedNamespace() {
        if(empty($this->fullQualifiedNamespace) && !empty($this->class)){
            $this->fullQualifiedNamespace = $this->getFullQualifiedNamespaceTrait($this->namespace, $this->class);
        }

        return $this->fullQualifiedNamespace;
    }
455023
public function getNameSpace()
	{
		$nsAlias = Yii::getAlias(self::NAMESPACE_ALIAS_NAME,false);

		return   $nsAlias === false ? $this->namespace : $nsAlias;
	}
261270
public function getExtendedClassName()
    {
        if ($this->getExtendedClass() === null) {
            return '';
        }

        $name = str_replace('%', ' ', $this->getExtendedClass());
        $name = str_replace('.', ' ', $name);
        $name = str_replace(':', ' pseudo-class-', $name);
        return trim($name);
    }
714237
protected function getNamespace() {
		$np = explode('\\', $this->getClass());
		unset($np[count($np) - 1]);
		return join('\\', $np);
	}
1035964
private function name() {
    $node = new NameNode();
    if ($this->tryMatch(T_NAMESPACE, $node)) {
      $this->mustMatch(T_NS_SEPARATOR, $node);
    }
    elseif ($this->tryMatch(T_NS_SEPARATOR, $node)) {
      // Absolute path
    }
    $this->mustMatch(T_STRING, $node, NULL, TRUE);
    while ($this->tryMatch(T_NS_SEPARATOR, $node)) {
      $this->mustMatch(T_STRING, $node, NULL, TRUE);
    }
    return $node;
  }
330427
private function getNamespaces()
    {
      $this->namespaces = array();

      $nodeList = $this->documentElement->getElementsByTagName('*');

      foreach($nodeList as $node)
      {
        if (strlen($node->prefix) && strlen($node->namespaceURI) && !in_array($node->prefix, $this->namespaces))
          $this->namespaces[$node->prefix] = $node->namespaceURI;
      }

      return $this->namespaces;
    }
653744
function getFormattedNamespaces() {
		$ns = $this->getNamespaces();
		foreach ( $ns as $k => $v ) {
			$ns[$k] = strtr( $v, '_', ' ' );
		}
		return $ns;
	}
1058444
public function getFQN()
    {
        if (empty($this->namespaceId) || empty($this->name))
            return "";

        return sprintf("%s:%s", $this->namespaceId, $this->name);
    }
617177
protected function getSoapNamespace(): string
    {
        if (!array_key_exists($this->soapVersion, static::SOAP_NAMESPACES)) {
            throw new InvalidArgumentException('Unsupported SOAP version');
        }

        return static::SOAP_NAMESPACES[$this->soapVersion];
    }
1310822
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        if ($this->fq_classlike_name === 'static') {
            return 'static::' . $this->const_name;
        }

        if ($this->fq_classlike_name === $this_class) {
            return 'self::' . $this->const_name;
        }

        if ($namespace && stripos($this->fq_classlike_name, $namespace . '\\') === 0) {
            return preg_replace(
                '/^' . preg_quote($namespace . '\\') . '/i',
                '',
                $this->fq_classlike_name
            ) . '::' . $this->const_name;
        }

        if (!$namespace && stripos($this->fq_classlike_name, '\\') === false) {
            return $this->fq_classlike_name . '::' . $this->const_name;
        }

        if (isset($aliased_classes[strtolower($this->fq_classlike_name)])) {
            return $aliased_classes[strtolower($this->fq_classlike_name)] . '::' . $this->const_name;
        }

        return '\\' . $this->fq_classlike_name . '::' . $this->const_name;
    }
574624
public function getNamespace()
    {
        if (! is_null($this->namespace)) {
            return $this->namespace;
        }

        $composer = json_decode(file_get_contents(base_path('composer.json')), true);

        foreach ((array) data_get($composer, 'autoload.psr-4') as $namespace => $path) {
            foreach ((array) $path as $pathChoice) {
                if (realpath(app()->path()) == realpath(base_path().'/'.$pathChoice)) {
                    return $this->namespace = $namespace;
                }
            }
        }

        throw new RuntimeException('Unable to detect application namespace.');
    }
111341
public function getXIncludeNamespace(){
        $ns = '';
        $relatedItem = $this->getRelatedItem();
        if(!is_null($relatedItem)){
            foreach($relatedItem->getNamespaces() as $name => $uri){
                if(strpos($uri, 'XInclude') > 0){
                    $ns = $name;
                    break;
                }
            }
        }
        return $ns;
    }
896297
public function AllNamespaces()
	{
		// In PHP 7.0 $this is passed to closure functions automatically but not in earlier versions
		$contexts = &$this->contexts;
		$instance = &$this->instance;

		$result = array_reduce( array_keys( $this->contexts ), function( $carry, $context ) use( &$contexts, &$instance ) {

			// The context may be invalid in which case exclude
			if ( ! isset( $contexts[ $context ]['entity']['segment']['explicitMember'] ) || count( $contexts[ $context ]['entity']['segment']['explicitMember'] ) == 0 )
				return $carry;

			// Each context may have more than one segment.  If the filter matches any one segment the context will be included.
			$context_segments = $instance->getElementsForContext( $context, true );

			foreach ( $context_segments as $key => $segment )
			{
				if ( ! isset( $segment['dimension']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['dimension']['namespace'] ] = 1;

				if ( ! isset( $segment['member']['namespace'] ) || isset( $carry[ $segment['dimension']['namespace'] ] ) ) continue;
				$carry[ $segment['member']['namespace'] ] = 1;
			}

			return $carry;

		}, array() );

			return array_keys( $result );
	}
1004175
public function getNamespace()
    {
        if (is_null($this->_namespace)) {
            $namespace = $this->getConfiguration()
                ->get('router.namespace', 'Controllers');
            if (isset($this->_params['namespace'])) {
                $namespace = $this->_params['namespace'];
            }
            $this->_namespace = trim($namespace, '\\');
        }
        return $this->_namespace;
    }
582594
public function getNamespace()
	{
	    if (!isset($this->namespace)) {
	        if ($this->isApp()) {
	            $this->namespace = Config::get('app.namespace') ?: '\\' . ucfirst(basename($this->basePath));
	        } else {
	            $name = str_replace(Ioc::app()->basePath, '', $this->basePath);
	            $name = StringHelper::toClassName($name);
	            $this->namespace = Ioc::app()->getNamespace() . '\\' . $name;
	        }
	    }
	    
	    return $this->namespace;
	}
1183209
function getNamespace() {
    if (FALSE === $pos = strrpos($this->fqcnStr, '\\')) {
      return NULL;
    }
    $namespaceFqcnStr = substr($this->fqcnStr, 0, $pos);
    return self::createFromValidFqcnString($namespaceFqcnStr);
  }
116203
public function setFullQualifiedNamespace($fullQualifiedNamespace) {
        if (empty($this->class) && empty($this->namespace)) {
            $extracted       = $this->extractNamespace($fullQualifiedNamespace);
            $this->class     = $extracted['class'];
            $this->namespace = $extracted['namespace'];
        }


        $this->fullQualifiedNamespace = $fullQualifiedNamespace;
    }