17 import(
'lib.pkp.classes.core.ItemIterator');
42 parent::__construct();
49 $this->itemsPerPage = max(count($this->theArray),1);
54 reset($this->theArray);
63 if ($theRange && $theRange->isValid()) {
76 if (!is_array($this->theArray)) {
80 $value =
current($this->theArray);
81 if (
next($this->theArray)===
false) {
82 $this->theArray =
null;
92 $key = key($this->theArray);
93 $value = $this->
next();
94 return array($key, $value);
102 return $this->page==1;
110 return ($this->page * $this->itemsPerPage) + 1 >
$this->count;
134 return max(1, ceil($this->count / $this->itemsPerPage));
142 return (($this->theArray ==
null) || (
count($this->theArray)==0));
177 if (!is_array($array))
return false;
180 $length = $len >= 0? $len: count($array);
181 $keys = array_slice(array_keys($array), $offset, $length);
182 foreach($keys as $key) {
183 $return[$key] = $array[$key];