载入别名设置
@param array $aliases
@return $this
@throws \RuntimeException
160716
public function loadAliases(array $aliases)
    {
        foreach ($aliases as $alias => $path) {
            $this->alias($alias, $path);
        }

        return $this;
    }
1057843
public function setActions($actions)
    {
        if ($this->getState() != self::INIT) {
            throw new \RuntimeException('Invalid state.');
        }

        if (count($actions) == 0) {
            $this->setState(self::INVALID);
            throw new \RuntimeException('No actions given.');
        }

        $this->actions = array_combine($actions, $actions);
        $this->setState(self::REGISTER);

        return $this;
    }
40052
public function withAlias($aliasAction, $alias)
    {
        $this->aliasAction = $aliasAction;
        $this->alias = $alias;
        return $this;
    }
831430
public function setAlias($aliasName, $definition = '')
    {
        if (is_array($aliasName) && !empty($aliasName)) {

            foreach ($aliasName as $id => $item) {
                $this->_alias[$id] = array(
                    'class' => $item,
                    'params' => '',
                    'type' => self::TYPE_DEFINITION_STRING,
                );

                $this->_definitions[$id] = $item;
            }

        } else {

            $aliasName = strtolower($aliasName);
            $this->_alias[$aliasName] = array(
                'class' => $definition,
                'params' => '',
                'type' => self::TYPE_DEFINITION_STRING,
            );

            $this->_definitions[$aliasName] = $definition;

        }

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

        return $aliasManipulator;
    }
579592
public function setAliases(array $names) {
        if ($this->frozen)      throw new RuntimeException('Configuration of "'.get_class($this).'" is frozen');
        if ($this->name === '') throw new IllegalStateException('A default command (name="") cannot have aliases');

        foreach ($names as $i => $alias) {
            $this->validateName($alias);
        }
        $this->aliases = array_diff($names, [$this->name]);     // remove an overlapping command name
        return $this;
    }
1120996
public function setAlias($alias)
    {
        if (is_array($alias)) {
            $this->aliasArray = $this->valideAliasArray($alias);
            $this->aliasName = $this->aliasArrayToName($this->aliasArray);
        } else {
            $this->aliasName = $this->valideAliasName($alias);
            $this->aliasArray = $this->aliasNameToArray($this->aliasName);
        }

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

        return $this;
    }
1185420
public static function start($alias)
    {
        if (isset(self::$timers[$alias])) {
            throw new \RuntimeException('Timer has already been started.');
        }

        self::$timers[$alias] = microtime();
    }
1223632
public function setNamespaceAliases(array $namespace_aliases)
    {
        $this->namespace_aliases = array();
        foreach ($namespace_aliases as $alias => $fqnn) {
            $this->setNamespaceAlias($alias, $fqnn);
        }
        return $this;
    }
336041
protected function _buildOrder($aliases = [])
    {
        $result = [];
        foreach ($this->_parts['order'] as $column => $dir) {
            $column = $this->dialect()->name($column, $aliases);
            $result[] = "{$column} {$dir}";
        }
        return $this->_buildClause('ORDER BY', join(', ', $result));
    }
1124950
public function addAliases(array $aliases): void
    {
        foreach ($aliases as $alias) {
            $this->aliases[] = '\\('.$alias;
        }
        $this->aliases = \array_unique($this->aliases);
    }
1315416
protected function setNamespace($alias, $props)
    {
        array_walk($props, function (&$value) {
            if (is_array($value)) {
                $value = array_unique($value);
            }
        });

        $this->namespaces[$alias] = array_filter($props);
    }
238008
public function alias(string $alias): AliasInterface
    {
        if (!in_array($alias, $this->alias)) {
            $this->alias[] = $alias;
        }
        $this->aliasHelper($alias);

        return $this;
    }
1027585
public static function getInstance( array $aliases = [] )
	{
		if( is_null( static::$instance )) {
			return static::$instance = new static( $aliases );
		}

		$aliases = array_merge( static::$instance->aliases, $aliases );

		static::$instance->aliases = $aliases;

		return static::$instance;
	}
849362
public function updateAliases(array $aliasActions)
    {
        if (!isset($aliasActions['actions'])) {
            throw new RepositoryException('Actions key is missing');
        }

        $request = $this->createRequestInstance(self::INDEX_UPDATE_ALIASES, null, null);
        $request->setBody($aliasActions);

        return $this->client->send($request);
    }
941249
public function setClassAlias(string $aliasedClass)
    {
        $this->classAlias = RecursiveFormatterHelper::camelCaseToUnderscore(
            RecursiveFormatterHelper::namespaceAsArrayKey($aliasedClass)
        );

        return $this;
    }