Adds an alias.
If the alias already exists the types are merged.
@param string $alias
@param array $target
767424
public function addAlias($alias, array $target)
    {
        $this->alias[$alias] = isset($this->alias[$alias]) ? array_merge($this->alias[$alias], $target) : $target;

        if (in_array($alias, $this->types)) {
            return;
        }
        $this->types[] = $alias;

    }
40052
public function withAlias($aliasAction, $alias)
    {
        $this->aliasAction = $aliasAction;
        $this->alias = $alias;
        return $this;
    }
1276950
protected function merge($target, $source)
    {
        if ($source === null) {
            return $target;
        }

        return call_user_func($this->merge, $target, $source);
    }
1198907
public function addAlias(string $key, string $alias): AliasResolver
    {
        $this->aliases[$key] = $alias;

        return $this;
    }
608560
private function preload($target, $alias)
    {
        if (!is_file($target) || !is_readable($target)) {
            throw new RuntimeException('Either invalid file supplied or its not readable');
        }

        // Prepare base name
        if ($alias === null) {
            $baseName = FileManager::getBaseName($target);
        } else {
            $baseName = $alias;
        }

        // Grab the Mime-Type
        $mime = FileManager::getMimeType($target);

        $this->prepare($mime, $baseName);
    }
157231
public function registerAlias($alias, $file, $extension = null)
    {
        if ($extension === null) {
            $extension = File::extension($file);
        }

        $extension = strtolower($extension);

        if (!isset($this->aliases[$extension])) {
            $this->aliases[$extension] = [];
        }

        $this->aliases[$extension][$alias] = $file;

        return $this;
    }
354878
public function alias($alias, $key)
    {
        if ($key !== $alias && $this->has($key)) {
            $this->_aliases[$alias] = $key;
        }
        
        return $this;
    }
310898
public function alias($identifier, $alias)
    {
        $alias      = trim((string) $alias);
        $identifier = (string) $identifier;

        //Don't register the alias if it's the same as the identifier
        if($alias != $identifier) {
            $this->_aliases[$alias] = (string) $identifier;
        }

        return $this;
    }
1031720
public function addAlias($routeName, $alias)
    {
        if(is_array($alias))
            foreach($alias as $item)
                $this->aliasIndices[$item] = $routeName;
        else
            $this->aliasIndices[$alias] = $routeName;

        return $this;
    }
1359098
public function setAlias($name, $alias)
    {
        if ($alias === null && isset($this->aliases[$name])) {
            unset($this->aliases[$name]);
        } else {
            $this->aliases[$name] = $alias;
        }

        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;
    }
74847
public function addAliases(array $aliases)
    {
        foreach ($aliases as $alias => $id) {
            $this->setAlias($alias, $id);
        }
    }
1322574
public function sync($origin, $target)
    {
        $command = $this->getCommand($origin, $target);

        $command->execute($this->showOutput);
    }
813293
public function add($alias, $item = null, array $options = null)
    {
        $this->addItem($alias, $item, $options);
    }
238008
public function alias(string $alias): AliasInterface
    {
        if (!in_array($alias, $this->alias)) {
            $this->alias[] = $alias;
        }
        $this->aliasHelper($alias);

        return $this;
    }
761120
protected function addIfIsset(array &$target, $key, array $source)
    {
        if (isset($source[$key])) {
            $target[$key] = $source[$key];
            return true;
        }
        return false;
    }
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);
    }