Provide domain name by it's alias.

@param string  $alias Domain name alias, useful for easier domain usage.

@return string  Returns associated domain if exists, otherwise it returns unchanged $alias.
177248
public function getDomain($alias) {
		if (isset($this->aliases[$alias])) {
			return $this->aliases[$alias];
		}
		return $alias;
	}
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
        );
    }
252779
protected function normalizeAlias($alias)
    {
        $normalized = preg_replace('/[^a-zA-Z0-9]/', ' ', $alias);
        $normalized = 'new' . str_replace(' ', '', ucwords($normalized));
        return $normalized;
    }
14493
protected function getAliasAndSuffix($alias = null)
    {
        $suffix = count($this->getParameters());
        $alias = $this->getFirstAlias($alias);

        return array($alias, $suffix);
    }
499753
public function getAuthenticate($alias)
    {
        if (empty($this->_authenticateObjects)) {
            $this->constructAuthenticate();
        }

        return isset($this->_authenticateObjects[$alias]) ? $this->_authenticateObjects[$alias] : null;
    }
1008846
public function getConfiguration($alias)
    {
        if (array_key_exists($alias, $this->searchConfigurations)) {
            return $this->searchConfigurations[$alias];
        }

        return null;
    }
503319
public function get($alias) {
        return !empty($this->routingTable[$alias]) ? $this->routingTable[$alias] : null;
    }
563857
public function getMappingByAlias(string $alias) : Mapping
    {
        foreach ($this->mappings as $mapping) {
            if (0 === strcasecmp($alias, $mapping->getClassAlias())) {
                return $mapping;
            }
        }

        return Mapping::null();
    }
39542
public function alias($alias)
    {
        $this->alias = $alias;

        if (!in_array('`' . $alias . '`.*', $this->select)) {
            $this->select[] = '`' . $alias . '`.*';
        }

        if (in_array('`' . $this->table . '`.*', $this->select)) {
            unset($this->select[array_search('`' . $this->table . '`.*', $this->select)]);
        }

        return $this;
    }
1251608
public function get(string $alias = null)
    {
        if (is_null($alias)) {
            return $this->aliases;
        }

        return $this->has($alias) ? $this->aliases[$alias] : false;
    }
1165728
public static function alias($name, $alias = null)
    {
        // get real name for $id
        if (null === $alias) {
            return self::resolveAlias($name);
        }

        foreach ((array)$alias as $aliasName) {
            if (!isset(self::$aliases[$aliasName])) {
                self::$aliases[$aliasName] = $name;
            }
        }

        return true;
    }
88757
public function getType($alias)
    {
        if (array_key_exists($alias, $this->types)) {
            return $this->types[$alias];
        }

        return false;
    }
959902
public function fetch( $alias ) {
		if ( isset( $this->classes[ $alias ] ) ) {
			// If the alias is a class name,
			// then retrieve its linked alias.
			// This is only registered when
			// registering using an array.
			$alias = $this->classes[ $alias ];
		}

		if ( ! isset( $this->aliases[ $alias ] ) ) {
			throw new UndefinedAliasException( $alias );
		}

		$value = $this->definitions[ $alias ];

		// If the shared value is a closure,
		// execute it and assign the result
		// in place of the closure.
		if ( $value instanceof \Closure ) {
			$factory = $value;
			$value   = $factory( $this );
		}

		// If the value is shared, save the shared value.
		if ( isset( $this->shared[ $alias ] ) ) {
			$this->definitions[ $alias ] = $value;
		}

		// Return the fetched value.
		return $value;
	}
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;
    }
1135492
public function lang($alias)
    {
        $alias = Str::slug($alias);

        foreach ($this->aliases as $lang => $aliases) {
            if (in_array($alias, $aliases)) {
                return $lang;
            }
        }

        return $alias;
    }
353312
public function setAlias($alias)
    {
        $aliasManipulator = new AliasManipulator($this->originalDir, $this->alias);
        $aliasManipulator->setAlias($alias);

        return $aliasManipulator;
    }
978855
protected function _reverseAlias($alias)
    {
        $config = $this->getServiceManager()->get('Config');
        $aliases = $config['controllers']['invokables'];
        if (array_key_exists($alias, $aliases)) {
            return $aliases[$alias];
        }
        return $alias;
    }