https://github.com/whiteoctober/Pagerfanta/blob/master/src/Pagerfanta/View/DefaultView.php#L47

The route generator is injected from the view the the template:
https://github.com/whiteoctober/Pagerfanta/blob/master/src/Pagerfanta/View/DefaultView.php#L79