final protected function addUrlParam(&$link, $name, $value)
    {
        $base = $name . '=' . $value;

        if (false !== \strpos($link, '?')) {
            $last = \substr($link, -1);

            if ('?' === $last || '&' === $last) {
                $link .= $base;
            } else {
                $link .= '&' . $base;
            }
        } else {
            $link .= '?' . $base;
        }
    }