/**
  * Generates the url for a given page in a pagerfanta instance.
  *
  * @param \Pagerfanta\PagerfantaInterface $pagerfanta
  * @param $page
  * @param array $options
  *
  * @return string The url of the given page
  *
  * @throws \InvalidArgumentException
  */
 public function getPageUrl(PagerfantaInterface $pagerfanta, $page, array $options = array())
 {
     if ($page < 0 || $page > $pagerfanta->count()) {
         throw new \InvalidArgumentException("Page '{$page}' is out of bounds");
     }
     $routeGenerator = $this->createRouteGenerator($options);
     return $routeGenerator($page);
 }