RSSPaginator.php 600 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. // Un système de pagination beaucoup plus simple que Paginator
  3. // mais mieux adapté à nos besoins
  4. class RSSPaginator {
  5. private $items = array ();
  6. private $next = '';
  7. public function __construct ($items, $next) {
  8. $this->items = $items;
  9. $this->next = $next;
  10. }
  11. public function isEmpty () {
  12. return empty ($this->items);
  13. }
  14. public function items () {
  15. return $this->items;
  16. }
  17. public function next () {
  18. return $this->next;
  19. }
  20. public function render ($view, $getteur) {
  21. $view = APP_PATH . '/views/helpers/'.$view;
  22. if (file_exists ($view)) {
  23. include ($view);
  24. }
  25. }
  26. }