Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120350533
PaginationIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 17:18
Size
623 B
Mime Type
text/x-php
Expires
Sat, Jul 5, 17:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27176173
Attached To
rPH Phabricator
PaginationIterator.php
View Options
<?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
;
}
}
Event Timeline
Log In to Comment