diff options
| author | 2013-05-05 13:20:13 +0200 | |
|---|---|---|
| committer | 2013-05-05 13:20:13 +0200 | |
| commit | 2e7afb7d340eb367d65ac042ae24a10fa021c073 (patch) | |
| tree | 27208483aac8262cdc42ee492a0f222991a0b4fa /app/models/RSSPaginator.php | |
| parent | ae7c9787cd8afd4313d356c6525e40d4ce79f99b (diff) | |
| parent | d4e6176a1ae210c011b14839023f91b4014f2881 (diff) | |
Merge branch 'releases'0.3.0
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); + } + } +} |
