Get alias

@param string $alias

@return string
@throws \InvalidArgumentException
425885
public static function getAlias(string $alias): string
    {
        // empty OR not an alias
        if (!$alias || $alias[0] !== '@') {
            return $alias;
        }

        if (isset(self::$aliases[$alias])) {
            return self::$aliases[$alias];
        }

        list($root) = \explode('/', $alias, 2);
        if (!isset(self::$aliases[$root])) {
            throw new \InvalidArgumentException('The set root alias does not exist，alias=' . $root);
        }

        $rootPath  = self::$aliases[$root];
        $aliasPath = \str_replace($root, '', $alias);

        return $rootPath . $aliasPath;
    }
727676
public function alias($alias = null)
    {
        if ($alias === null) {
            return $this->_alias;
        }
        $this->_alias = $alias;

        return $this;
    }
252779
protected function normalizeAlias($alias)
    {
        $normalized = preg_replace('/[^a-zA-Z0-9]/', ' ', $alias);
        $normalized = 'new' . str_replace(' ', '', ucwords($normalized));
        return $normalized;
    }
238008
public function alias(string $alias): AliasInterface
    {
        if (!in_array($alias, $this->alias)) {
            $this->alias[] = $alias;
        }
        $this->aliasHelper($alias);

        return $this;
    }
749691
public function alias(string $alias = null)
    {
        $clone = clone $this;
        $clone->value = sprintf('%s AS %s', $clone->value, $this->quoter->quoteName($alias));

        return $clone;
    }
377955
private function getNameByAlias($alias)
    {
        return isset($this->_contentMap[$alias]) ? $this->_contentMap[$alias] : $alias;
    }
1075100
public static function getRouteByAlias($alias)
    {
        //No routes
        if (empty(self::$routes)) {
            return;
        }

        //Search in the map
        $route = null;

        if (($index = array_search($alias, array_column(self::$routes, 'alias'))) !== false) {
            $route = self::$routes[$index]['route'];
        }

        return $route;
    }
247778
public function getHubInfo($alias)
    {
        $this->checkAliasName($alias);

        return $this->adapter->get(sprintf('/hub/%s/info', $alias));
    }
1351111
public function getInstance($alias = null)
    {
        if (!$alias && !$this->mainAlias) {
            $namespace = explode('\\', $this->_entityName);
            $alias = strtolower(end($namespace));
            $this->mainAlias = $alias;
        } elseif ($alias) {
            $this->mainAlias = $alias;
        }

        return $this->qb ? $this->qb : $this->qb = $this->createQueryBuilder($this->mainAlias);
    }
588535
public function get(string $alias, $throwException = true)
    {
        if (0 !== \strpos($alias, '@')) {
            return $alias;
        }

        $pos = \strpos($alias, '/');
        /** @var string $root */
        $root = $pos === false ? $alias : \substr($alias, 0, $pos);

        if (isset($this->aliases[$root])) {
            return $pos === false ? $this->aliases[$root] : $this->aliases[$root] . \substr($alias, $pos);
        }

        if ($throwException) {
            throw new AliasException("Invalid alias: $alias");
        }

        return null;
    }
213247
public function getTableFromAlias(string $alias) : \Dms\Core\Persistence\Db\Schema\Table
    {
        if ($this->alias === $alias) {
            return $this->table;
        }

        foreach ($this->joins as $join) {
            if ($join->getAlias() === $alias) {
                return $join->getTable();
            }
        }

        throw InvalidArgumentException::format(
            'Invalid alias supplied to %s: expecting one of (%s), \'%s\' given',
            __METHOD__, Debug::formatValues($this->getAliases()), $alias
        );
    }
1007300
public function getTableForAlias($alias)
    {
        if (isset($this->aliases[$alias])) {
            return $this->aliases[$alias];
        }

        return null;
    }
1331001
public static function getInstance($alias = null)
	{
		if('' === static::$driverName)
		{
			static::init();
		}
		if(null === $alias)
		{
			$alias = self::defaultAlias();
		}
		if (isset(self::$instances[static::$driverName][$alias]))
		{
			return self::$instances[static::$driverName][$alias];
		}
		else
		{
			$option = Config::get('@.APP_' . strtoupper(static::$driverName) . '.' . $alias);
			if(false === $option)
			{
				return null;
			}
			else
			{
				return self::create($option,$alias);
			}
		}
	}
561494
public function getConvertedValue($alias = null)
    {
        if ($alias && isset($this->convertedAliasValue[$alias])) {
            return $this->convertedAliasValue[$alias];
        } else {
            return $this->convertedValue;
        }
    }
155048
public function alias($alias = null)
    {
        if (null === $alias) {
            $alias = $this->getTableAlias();
        }
        $this->oosql_table_alias = $alias;
        return $this;
    }
1008846
public function getConfiguration($alias)
    {
        if (array_key_exists($alias, $this->searchConfigurations)) {
            return $this->searchConfigurations[$alias];
        }

        return null;
    }
1285184
public function getContentType($alias)
    {
        if ($this->legacyStorage !== null) {
            return $this->legacy()->getContentType($alias);
        }

        return $this->mapping->createContentType($alias);
    }