You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
686 B
37 lines
686 B
<?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 next () { |
|
return $this->next; |
|
} |
|
|
|
public function peek () { |
|
return empty($this->items) ? null : $this->items[0]; |
|
} |
|
|
|
public function render ($view, $getteur) { |
|
$view = APP_PATH . '/views/helpers/'.$view; |
|
|
|
if (file_exists ($view)) { |
|
include ($view); |
|
} |
|
} |
|
}
|
|
|