Adding a Paginator class for PHP.