summaryrefslogtreecommitdiff
path: root/app/models/RSSPaginator.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 12:58:27 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-05-05 12:58:27 +0200
commit99e8fc0ad67bf7ff14f53fd141fe57b96a107648 (patch)
tree78b07eaa7fdc9bde1bf2ecd11e65f22afdcc8944 /app/models/RSSPaginator.php
parent23dd73ddeec2473c3e8a3c517317e074ac53a1d8 (diff)
parent22e9fb02f838e2b6ac8c5dd504fad0446c5807dc (diff)
Merge branch 'dev' into releases
Diffstat (limited to 'app/models/RSSPaginator.php')
-rw-r--r--app/models/RSSPaginator.php29
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);
+ }
+ }
+}