예제 #1
0
파일: List.php 프로젝트: ahsanmage/vr
 /**
  * Implementation of IteratorAggregate::getIterator()
  */
 public function getIterator()
 {
     if (!$this->getPageSize() || !$this->getCurPage()) {
         return parent::getIterator();
     }
     $this->load();
     $start = $this->getPageSize() * ($this->getCurPage() - 1);
     return new ArrayIterator(array_slice($this->_items, $start, $this->getPageSize()));
 }