@param $alias

@return $this
776065
public function alias($alias)
    {
        $alias = (string)$alias;
        if (in_array($alias, $this->with)) {
            throw new \InvalidArgumentException("Cannot use alias '{$alias}' because a relation already uses it");
        }

        $this->alias = $alias;

        return $this;
    }
1261955
public function alias($alias = null)
    {
        deprecationWarning(
            get_called_class() . '::alias() is deprecated. ' .
            'Use setAlias()/getAlias() instead.'
        );
        if ($alias !== null) {
            $this->setAlias($alias);
        }

        return $this->getAlias();
    }
460092
public function addAlias($alias, $tagName)
    {
        if($this->getComponentFactory($tagName)) {
            $this->alias[(string) $alias] = (string) $tagName;
        }
        return $this;
    }
1299821
public function column($name, string $alias = null): self
    {
        $this->sql->addColumn($name, $alias);
        return $this;
    }
994147
public function setAliasOf($alias) {
        $alias = $this->normalizeID($alias);

        if ($alias === $this->currentRuleName) {
            trigger_error("You cannot set alias '$alias' to itself.", E_USER_NOTICE);
        } else {
            $this->currentRule['aliasOf'] = $alias;
        }
        return $this;
    }
787089
public function from($table, $alias = null)
    {
        if ($alias === null) {
            $this->from[] = $this->grammar->buildId($table);
        } else {
            $this->from[] = $this->grammar->buildIdWithAlias($table, $alias);
        }

        return $this;
    }
1214927
public function select($column, string $alias = null): self
    {
        if (\is_string($column)) {
            if (\strpos($column, ',')) {
                $this->select = \array_merge($this->select, \array_filter(\explode(',', $column)));
            } else {
                $this->select[$column] = $alias;
            }
        } elseif (\is_array($column)) {
            foreach ($column as $col => $ali) {
                if (\is_numeric($col)) {
                    $this->select[$ali] = null;
                } else {
                    $this->select[$col] = $ali;
                }
            }
        }

        return $this;
    }
514740
public function addAlias($aliases)
    {
        if (! is_array($aliases)) {
            $aliases = func_get_args();
        }

        foreach ($aliases as $alias) {
            $this->aliases[] = $alias;
        }

        return $this;
    }
1128460
public function from($table, $alias = null)
    {
        if ($table) {
            if (!$this->_model && strpos($table, '\\') !== false) {
                $this->_model = $this->_di->getShared($table);
            }

            $this->_tables = $alias ? [$alias => $table] : [$table];

            if ($table instanceof self) {
                $this->_db = $table->_db;
            }
        }

        return $this;
    }
1252775
public function aliasAuthor($alias, $realAuthor)
    {
        $this->mapping[$this->arrayKey($alias)] = trim($realAuthor);

        return $this;
    }
998977
public function alias($alias = null)
    {
        if ($alias !== null) {
            $this->alias = $alias;
        }

        return $this->alias;
    }
963877
public static function setAlias(string $alias, string $value)
    {
        self::getInstance()->setAlias($alias, $value);
    }
910316
public function columnSet($name,&$alias=null)
	{
		if( is_null($alias) )
		{
			$alias = $name;
			$this->setColumns($name, $this->getAlias());
		}
		else
		{
			$this->setColumns(array($alias=>$name), $this->getAlias());
		}
		$this->addSetting($alias,self::settingDefaultGet($name));
		return $this;
	}
1280766
public function table(string $table, string $alias = null): self
    {
        $this->table['table'] = $this->getTableNameByClassName($table);
        $this->table['alias'] = $alias;

        return $this;
    }
1120335
public function from($table, string $alias = null): self
    {
        return $this->table($table, $alias);
    }
520593
public function alias($abstract, $alias)
    {
        $this->aliases[$alias] = $abstract;
//        $this->abstractAliases[$abstract][] = $alias;

        $this->share($alias, function () use ($abstract) {
            return $this->get($abstract);
        });
    }
667053
public function from($table, $alias = null) {
        $this->_table = (string) $table;
        $this->asAlias($alias);

        return $this;
    }