alias map parse
@param string $name
@return string namespace
180233
protected static function aliasMapParse(string $name): string
    {
        $config = ServiceFactory::getInstance(AnnotationConfigServiceImpl::class);
        $aliasArr = $config->getConfig()['alias'] ?? [];
        return array_key_exists($name, $aliasArr) ? $aliasArr[$name] : $name;
    }
947882
protected function getNamespace($name)
    {
        $name = explode('\\', $name);
        
        unset($name[(count($name) - 1)]);

        $nameSpace = implode('\\', $name);

        return trim($nameSpace);
    }
931594
private function extractAllNamespaces($name)
    {
        // -1 as third argument is needed to skip the command short name when exploding
        $parts = explode(':', $name, -1);
        $namespaces = array();

        foreach ($parts as $part) {
            if (count($namespaces)) {
                $namespaces[] = end($namespaces).':'.$part;
            } else {
                $namespaces[] = $part;
            }
        }

        return $namespaces;
    }
781566
public function createNamespace($name) {
		if (isset($this->_namespaces[$name])) {
			return $this->_namespaces[$name];
		}
		
		$namespace = new Bag($name);
		
		if ($this->hasLocator()) {
			$namespace->setDi($this->getLocator());
		}
		
		$this->_namespaces[$name] = $namespace;
		return $namespace;
	}
1163210
function aliasGetName($nameOrAlias) {
    if ('\\' === $nameOrAlias[0]) {
      return substr($nameOrAlias, 1);
    }
    elseif (NULL !== $this->namespaceName) {
      return $this->namespaceName . '\\' . $nameOrAlias;
    }
    else {
      return $nameOrAlias;
    }
  }
363055
protected function findDefinitionFileByName($name)
    {
        $namespaceParts = explode('\\', $name);
        $filename = array_pop($namespaceParts).'.php';
        $namespace = implode('\\', $namespaceParts);

        $finder = new Finder();
        $finder
            ->name($filename)
            ->in($this->sourcePaths)
        ;

        $files = array();
        /** @var SplFileInfo $file */
        foreach ($finder as $file) {
            if (empty($namespace) || is_int(strpos($file->getContents(), $namespace))) {
                $baseFile = PhpFileInfo::create($file);
                $files[] = $this->usageParser->parseFile($baseFile);
            }
        }

        $file = current($files);

        if (!$file instanceof PhpFileInfo) {
            return;
        }

        return $file;
    }
789391
public function getAlias($name = null)
    {
        if (is_null($name)) {
            return $this->alias;
        }

        return isset($this->alias[$name]) ? $this->alias[$name] : null;
    }
939882
protected function parseName($name)
    {
        $this->checkNamespace();

        $rootNamespace = $this->getPackageNamespace();

        if (Str::startsWith($name, $rootNamespace)) {
            return $name;
        }

        if (Str::contains($name, '/')) {
            $name = str_replace('/', '\\', $name);
        }

        return $this->parseName($this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name);
    }
1114289
public static function getAlias($name)
    {
        $index_prefix = Config::get('larasearch.elasticsearch.index_prefix', '');
        if ($index_prefix && !Str::startsWith($name, $index_prefix)) $name = $index_prefix . $name;

        return self::getClient()->indices()->getAlias(['name' => $name]);
    }
886379
protected function _normalizeClass($name)
    {
        if (!$name || $name[0] === '\\') {
            return $name;
        }
        if ($this->_states['uses']) {
            $tokens = explode('\\', $name, 2);
            if (isset($this->_states['uses'][$tokens[0]])) {
                $prefix = $this->_states['uses'][$tokens[0]];
                return count($tokens) === 2 ? '\\' . $prefix . '\\' . $tokens[1] : '\\' . $prefix;
            }
        }
        $current = $this->_states['current'];
        $prefix = '\\';
        if ($current->namespace) {
            $prefix .= $current->namespace->name . '\\';
        }
        return $prefix . $name;
    }
865885
public static function create($name) {
    $name = (string) $name;
    $name = ltrim($name, '\\');
    $namespace_node = Parser::parseSnippet("namespace $name;");
    return $namespace_node;
  }
517303
function aliasGetName($nameOrAlias) {
    if ('\\' === $nameOrAlias[0]) {
      return substr($nameOrAlias, 1);
    }
    elseif (array_key_exists($nameOrAlias, $this->namesByAlias)) {
      return $this->namesByAlias[$nameOrAlias];
    }
    elseif (NULL !== $this->namespaceName) {
      return $this->namespaceName . '\\' . $nameOrAlias;
    }
    else {
      return $nameOrAlias;
    }
  }
297791
public function encode($name) {
		$aliases = $this->aliases;
		if(empty($aliases)) {
			return $name;
		}
		return $this->aggregate($name, $aliases);
	}
887890
protected function parseName($name)
    {
        $tables = array_map('str_singular', $this->getSortedTableNames());
        $name = implode('', array_map('ucwords', $tables));
        return "Create{$name}PivotTable";
    }
1359085
public function getClassWithoutNamespace($name)
    {
        $pos = strrpos($name, '\\');
        
        return ($pos === false) ? $name : substr($name, $pos + 1);
    }
694686
protected function getMapping($name)
    {
        foreach($this->mappings as $key => $data) {
            if (in_array(strtolower($name), $data['accepted_names'])) {
                return $key;
            }
        }

        return false;
    }
492186
private function fileNameToNamespaceParts(string $name)
    {
        $name = preg_replace('/(.*)(\.[\w\d]+)$/', '$1', $name);
        return array_map(function ($e) {
            $e = ucfirst($e);
            $e = implode("", array_map('ucfirst', explode(".", $e)));
            $e = implode("", array_map('ucfirst', explode("-", $e)));
            return $e;
        }, explode('/', $name));
    }