Compute suffix and alias used by query part.

@param string $alias

@return array
14493
protected function getAliasAndSuffix($alias = null)
    {
        $suffix = count($this->getParameters());
        $alias = $this->getFirstAlias($alias);

        return array($alias, $suffix);
    }
283927
public function getAlias($alias) {
		if (!is_string($alias)) {
			return $alias;
		}

		if (array_key_exists($alias, $this->aliases)) {
			return $this->aliases[$alias];
		}

		return $alias;
	}
68472
private function get_alias_property( $alias )
	{
		if ( array_key_exists( $alias, $this->aliases ) )
			return $this->aliases[$alias];

		return $alias;
	}
177248
public function getDomain($alias) {
		if (isset($this->aliases[$alias])) {
			return $this->aliases[$alias];
		}
		return $alias;
	}
1251924
public function getTranslations($alias) {
		$translations = [];
		foreach ($this->_possible as $possible) {
			if ($this->translationExists($possible, $alias)) {
				$config = $this->getL10n($possible);
				$translations[$possible] = $config['title'];
			}
		}
		return $translations;
	}
604873
protected function parseModuleAlias($alias)
	{
	    return isset($this->_moduleAliases[$alias]) ? $this->_moduleAliases[$alias] : $alias;
	}
560940
public function hasFunctionAlias($alias)
    {
        return $this->hasAlias($alias) && $this->getExpression($this->getHash($alias)) instanceof Expr\Func;
    }
135791
protected function getAliasesByExtendsNamespace()
    {
        $aliases = $this->getValidAliases();

        $aliases = $aliases->filter(function (Alias $item) {
            return ! collect([
                'MessageStack',
                'AdminSection',
                'AdminTemplate',
                'AdminNavigation',
                'AdminColumn',
                'AdminColumnEditable',
                'AdminColumnFilter',
                'AdminDisplayFilter',
                'AdminForm',
                'AdminFormElement',
                'AdminDisplay',
            ])->search($item->getAlias());
        });

        return $aliases->groupBy(function (Alias $alias) {
            return $alias->getExtendsNamespace();
        });
    }
45313
public function resolveNamespaceAlias($alias)
	{
		foreach ($this->namespaces as $namespace)
		{
			list($from, $to) = $namespace;

			if ($empty = empty($to) or strpos($alias, $to) === 0)
			{
				if ( ! $empty)
				{
					$alias = substr($alias, strlen($to) + 1);
				}

				$class = $from.'\\'.$alias;
				$this->resolving[] = $class;

				if ($this->objectExists($class, true))
				{
					array_pop($this->resolving);

					return $class;
				}
			}
		}

		return false;
	}
974670
public function getAliasNamespace($alias)
    {
        foreach (array_keys($this->getManagers()) as $name) {
            try {
                return $this->getManager($name)->getConfiguration()->getDocumentNamespace($alias);
            } catch (PHPCRException $e) {
            }
        }

        throw PHPCRException::unknownDocumentNamespace($alias);
    }
342022
public static function filter_suffixed($array, $suffix, $remove_suffix = true)
    {
        $return = [];
        foreach ($array as $key => $val) {
            if (preg_match('/'.$suffix.'$/', $key)) {
                if ($remove_suffix === true) {
                    $key = preg_replace('/'.$suffix.'$/', '', $key);
                }
                $return[$key] = $val;
            }
        }
        return $return;
    }
883221
public function load(string $alias): bool
	{
		if(array_key_exists($alias, $this->aliases))
		{
			return class_alias($this->aliases[$alias], $alias);
		}

		return false;
	}
1002142
public function resolveAlias(string $alias)
    {
        if (isset($this->aliases[$alias]))
            return $this->aliases[$alias];

        if (empty($this->parent_scope))
            return null;

        return $this->parent_scope->resolveAlias($alias);
    }
898366
public function findOneByAlias($alias)
    {
        $query = $this->createValuedQueryBuilder('c')
            ->where('c.alias = :alias')
            ->setParameter('alias', $alias)
            ->getQuery();

        return $query->useResultCache(true, self::CACHE_TTL)->getSingleResult();
    }
1081760
public function getConfig($alias = null)
    {
        if ($alias === null) {
            return $this->_config;
        }

        return isset($this->_config[$alias]) ? $this->_config[$alias] : [];
    }
554445
public function getSubqueryByAlias($alias)
    {
        return $this->hasSubqueryAlias($alias) ? $this->getExpression($this->getHash($alias)) : null;
    }
749691
public function alias(string $alias = null)
    {
        $clone = clone $this;
        $clone->value = sprintf('%s AS %s', $clone->value, $this->quoter->quoteName($alias));

        return $clone;
    }