public function addAlias($alias, $id)
    {
        $this->validateAlias($alias, true);
        $this->validateId($id, true);
        // perform additional validations
        if ($alias === $id) {
            throw new Exception\LogicException(
                sprintf(
                    'The "%s" sting cannot be used as an alias for "%s" item'
                    . ' because an alias cannot be equal to the item id.',
                    $alias,
                    $id
                )
            );
        }
        if (isset($this->items[$alias])) {
            throw new Exception\LogicException(
                sprintf(
                    'The "%s" sting cannot be used as an alias for "%s" item'
                    . ' because another item with the same id exists.',
                    $alias,
                    $id
                )
            );
        }
        if (!isset($this->items[$this->resolveId($id)])) {
            throw new Exception\ItemNotFoundException(sprintf('The "%s" item does not exist.', $id));
        }

        $this->aliases->add($alias, $id);
    }