aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSPaginator.php
blob: 7010291bc066b7ce5050b9bafdcc87976e025372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
		}
	}
}