Get the namespace for the generator.
This will set the system folder | folder of the module.

@return string
970088
private function getCommandNamespace()
    {
        $concrete_namespace = $this->getCommandDeclaredNamespace();

        if ($this->hasOption('system-folder')) {

            $concrete_namespace = $concrete_namespace . '\\' . $this->option('system-folder');
        }

        if ($this->hasOption('folder')) {
            
            if ($this->option('folder')) {
                
                $concrete_namespace = $concrete_namespace . '\\' . $this->option('folder'); 
            }
        }

        return $this->sanitizedPath($concrete_namespace);
    }
40408
public function getDirectory()
    {
        $dir = new Directory($this->getDirname());

        $namespaces = explode('\\', $this->getNameSpace());
        array_pop($namespaces);
        $dir->setNamespace(join('\\', $namespaces));

        return $dir;
    }
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;
  }
888874
private static function getComposerNamespaces()
	{
		static $result = null;
		
		if ( !is_array($result) ) {
			$result = require self::$root . 'vendor/composer/autoload_namespaces.php';
			
			foreach ( $result as $ns => &$paths ) {
				$subpath = trim(str_replace('\\', DIRECTORY_SEPARATOR, $ns), DIRECTORY_SEPARATOR);
				foreach ( $paths as &$path ) {
					$path = rtrim($path, DIRECTORY_SEPARATOR);
					if ( is_dir("$path/$subpath") ) {
						$path = "$path/$subpath";
					}
				}
				unset($path);
			}
			unset($paths);
			
			$psr4 = require self::$root . 'vendor/composer/autoload_psr4.php';
			
			foreach ( $psr4 as $ns => $paths )
			{
				if ( isset($result[$ns]) ) {
					$result[$ns] = array_merge($result[$ns], $paths);
				}
				else {
					$result[$ns] = $paths;
				}
			}
		}
		
		return $result;
	}
1232371
public function getOGTypeNamespace()
    {
        if ($type = $this->owner->OGType) {
            return (strpos($type, '.') !== false) ? explode('.', $type)[0] : $type;
        }
    }
385683
protected function getFileNamespace()
    {
        if ($this->type == self::TYPE_APP) {
            return 'app\\blocks';
        }

        return Yii::$app->getModule($this->moduleName)->getNamespace()  . '\\blocks';
    }
475116
private function namespaceName() {
    $node = new NameNode();
    $this->mustMatch(T_STRING, $node, NULL, TRUE);
    while ($this->tryMatch(T_NS_SEPARATOR, $node)) {
      $this->mustMatch(T_STRING, $node, NULL, TRUE);
    }
    return $node;
  }
146677
private function getNamespacedPackageName()
    {
        $path = $this->getTemplateArgumentPath();
        $templateName = json_decode(file_get_contents($path . 'composer.json'))->name;
        $parts = explode('/', $templateName);
        return package_vendor_namespace($parts[0], $parts[1]) . '\Package';
    }
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;
    }
897683
private function getGroupControllerNamespace() : string
    {
        $controllerNamespace = '';

        foreach ($this->groupOptionsStack as $groupOptions) {
            if (isset($groupOptions['controllerNamespace'])) {
                // Add trailing slashes if they're not there already
                if (mb_substr($groupOptions['controllerNamespace'], -1) !== '\\') {
                    $groupOptions['controllerNamespace'] .= '\\';
                }

                $controllerNamespace .= $groupOptions['controllerNamespace'];
            }
        }

        return $controllerNamespace;
    }
999495
private function _namespace() {
    $node = new NamespaceNode();
    $this->matchDocComment($node);
    $this->mustMatch(T_NAMESPACE, $node);
    if ($this->currentType === T_STRING) {
      $name = $this->namespaceName();
      $node->addChild($name, 'name');
    }
    $this->matchHidden($node);
    $body = new StatementBlockNode();
    if ($this->tryMatch('{', $body)) {
      $this->topStatementList($body, '}');
      $this->mustMatch('}', $body);
      $node->addChild($body, 'body');
    }
    else {
      $this->endStatement($node);
      $this->matchHidden($node);
      $node->addChild($this->namespaceBlock(), 'body');
    }
    return $node;
  }
569375
public function getEntityNamespace()
    {
        $namespace = '';
        if (($bundleNamespace = $this->parseComment('bundleNamespace')) || ($bundleNamespace = $this->getConfig()->get(Formatter::CFG_BUNDLE_NAMESPACE))) {
            $namespace = $bundleNamespace.'\\';
        }
        if ($entityNamespace = $this->getConfig()->get(Formatter::CFG_ENTITY_NAMESPACE)) {
            $namespace .= $entityNamespace;
        } else {
            $namespace .= 'Entity';
        }

        return $namespace;
    }
1067590
protected function rootNamespace(): string
    {
        return $this->rootNamespace ?? $this->rootNamespace = implode('\\', array_map('ucfirst', explode('/', trim($this->moduleName()))));
    }
1019933
public function getRootNamespace ()
	{
		
		$arr		= explode ('\\', $this->get ('namespace'));
		$table		= explode ('_', $this->get ('table'));
		$ns			= [];
		
		foreach ($arr as $nsSegment)
		{
			$tableSegment	= array_shift ($table);
			if (strtolower ($nsSegment) != strtolower ($tableSegment))
			{
				$ns[]	= $nsSegment;
				array_unshift ($table, $tableSegment);
			}
		}
		
		$namespace	= join ('\\', $ns) . '\\';
		
		return $namespace;
	}
714835
public function getNamespace()
    {
        $name = $this->getNode()->nodeName;
        if (strpos($name, ':') !== false) {
            return implode('', array_slice(explode(':', $name), 0, -1));
        }
        return null;
    }
482738
public function getName()
    {
        if (null !== $this->name) {
            return $this->name;
        }

        $this->name = str_replace('\\', '', $this->getNamespace());

        return $this->name;
    }
653744
function getFormattedNamespaces() {
		$ns = $this->getNamespaces();
		foreach ( $ns as $k => $v ) {
			$ns[$k] = strtr( $v, '_', ' ' );
		}
		return $ns;
	}