public function add(string $rel, HttpUri $uri): Link
    {
        $link = new Link($rel, $uri);
        if (isset($this->links[$rel])) {
            if (!is_array($this->links[$rel])) {
                $this->links[$rel] = [$this->links[$rel]];
            }

            $this->links[$rel][] = $link;
        } else {
            $this->links[$rel] = $link;
        }

        return $link;
    }