Page MenuHomePhorge

PaginationIterator.php
No OneTemporary

Size
623 B
Referenced Files
None
Subscribers
None

PaginationIterator.php

<?php
namespace RESTful;
class PaginationIterator implements \Iterator
{
public function __construct($resource, $uri, $data = null)
{
$this->_page = new Page($resource, $uri, $data);
}
// Iterator
public function current()
{
return $this->_page;
}
public function key()
{
return $this->_page->index;
}
public function next()
{
$this->_page = $this->_page->next();
}
public function rewind()
{
$this->_page = $this->_page->first();
}
public function valid()
{
return $this->_page != null;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 5, 2:46 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69305
Default Alt Text
PaginationIterator.php (623 B)

Event Timeline