1: <?php
2: /**
3: * The Turba_View_List:: class provides an interface for objects that
4: * visualize Turba_List objects.
5: *
6: * @author Chuck Hagenbuch <chuck@horde.org>
7: * @author Jon Parise <jon@csh.rit.edu>
8: * @package Turba
9: */
10: /**
11: * Skips objects which are not on the current page
12: */
13: class Turba_View_List_PageFilter
14: {
15: protected $_min;
16: protected $_max;
17: protected $_count = 0;
18:
19: public function __construct($min, $max)
20: {
21: $this->_min = $min;
22: $this->_max = $max;
23: }
24:
25: public function skip($ob)
26: {
27: if ($this->_count++ < $this->_min) {
28: return true;
29: }
30:
31: return ($this->_count > $this->_max);
32: }
33:
34: }