diff options
Diffstat (limited to 'app/models/RSSPaginator.php')
| -rw-r--r-- | app/models/RSSPaginator.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/models/RSSPaginator.php b/app/models/RSSPaginator.php new file mode 100644 index 000000000..7010291bc --- /dev/null +++ b/app/models/RSSPaginator.php @@ -0,0 +1,29 @@ +<?php + +// Un système de pagination beaucoup plus simple que Paginator +// mais mieux adapté à nos besoins +class RSSPaginator { + private $items = array (); + private $next = ''; + + public function __construct ($items, $next) { + $this->items = $items; + $this->next = $next; + } + + public function isEmpty () { + return empty ($this->items); + } + + public function items () { + return $this->items; + } + + public function render ($view, $getteur) { + $view = APP_PATH . '/views/helpers/'.$view; + + if (file_exists ($view)) { + include ($view); + } + } +} |
