1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: 13: 14: 15:
16: abstract class Horde_Date_Repeater
17: {
18: public $now;
19:
20: 21: 22:
23: abstract public function width();
24:
25: 26: 27:
28: public function next($pointer = 'future')
29: {
30: if (is_null($this->now)) {
31: throw new Horde_Date_Repeater_Exception('Start point must be set before calling next()');
32: }
33:
34: if (!in_array($pointer, array('future', 'none', 'past'))) {
35: throw new Horde_Date_Repeater_Exception("First argument 'pointer' must be one of 'past', 'future', 'none'");
36: }
37: }
38:
39: public function this($pointer = 'future')
40: {
41: if (is_null($this->now)) {
42: throw new Horde_Date_Repeater_Exception('Start point must be set before calling this()');
43: }
44:
45: if (!in_array($pointer, array('future', 'none', 'past'))) {
46: throw new Horde_Date_Repeater_Exception("First argument 'pointer' must be one of 'past', 'future', 'none'");
47: }
48: }
49:
50: public function __toString()
51: {
52: return 'repeater';
53: }
54:
55: }
56: