[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 namespace RESTful; 4 5 class PaginationIterator implements \Iterator 6 { 7 public function __construct($resource, $uri, $data = null) 8 { 9 $this->_page = new Page($resource, $uri, $data); 10 } 11 12 // Iterator 13 public function current() 14 { 15 return $this->_page; 16 } 17 18 public function key() 19 { 20 return $this->_page->index; 21 } 22 23 public function next() 24 { 25 $this->_page = $this->_page->next(); 26 } 27 28 public function rewind() 29 { 30 $this->_page = $this->_page->first(); 31 } 32 33 public function valid() 34 { 35 return $this->_page != null; 36 } 37 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |