Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F453288
PaginationIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
623 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
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)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment