Page MenuHomestyx hydra

PaginationIterator.php
No OneTemporary

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
Tue, Feb 24, 9:34 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
807745
Default Alt Text
PaginationIterator.php (623 B)

Event Timeline