protected function pageUrl(int $page): string
    {
        if ($this->page_url_callback && is_callable($this->page_url_callback)) {
            return str_replace($this->page_replacement_code, $page, (string) $this->page_url_callback($page));
        }
        return str_replace($this->page_replacement_code, $page, $this->page_url);
    }