Splitter Test written. Doesn't pass.
[order_line_extra.git] / hincludes / lib / IntIter.class.php
1 <?php
2
3 class IntIter {
4         public function __construct($min, $max) {
5                 if(!php_Boot::$skip_constructor) {
6                 $this->min = $min;
7                 $this->max = $max;
8         }}
9         public function next() {
10                 return $this->min++;
11         }
12         public function hasNext() {
13                 return $this->min < $this->max;
14         }
15         public $max;
16         public $min;
17         public function __call($m, $a) {
18                 if(isset($this->$m) && is_callable($this->$m))
19                         return call_user_func_array($this->$m, $a);
20                 else if(isset($this->»dynamics[$m]) && is_callable($this->»dynamics[$m]))
21                         return call_user_func_array($this->»dynamics[$m], $a);
22                 else if('toString' == $m)
23                         return $this->__toString();
24                 else
25                         throw new HException('Unable to call «'.$m.'»');
26         }
27         function __toString() { return 'IntIter'; }
28 }