Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3282089
PhutilProxyIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhutilProxyIterator.php
View Options
<?php
abstract
class
PhutilProxyIterator
extends
Phobject
implements
Iterator
{
private
$iterator
;
private
$key
;
private
$value
;
private
$valid
;
public
function
__construct
(
Iterator
$iterator
)
{
$this
->
iterator
=
$iterator
;
}
protected
function
didReadValue
(
$value
)
{
return
$value
;
}
/* -( Iterator Implementation )-------------------------------------------- */
final
public
function
rewind
(
)
{
$this
->
iterator
->
rewind
(
)
;
$this
->
update
(
)
;
}
final
public
function
valid
(
)
{
return
$this
->
valid
;
}
final
public
function
current
(
)
{
return
$this
->
value
;
}
final
public
function
key
(
)
{
return
$this
->
key
;
}
final
public
function
next
(
)
{
$this
->
iterator
->
next
(
)
;
$this
->
update
(
)
;
}
private
function
update
(
)
{
$this
->
key
=
$this
->
iterator
->
key
(
)
;
$this
->
valid
=
$this
->
iterator
->
valid
(
)
;
if
(
$this
->
valid
)
{
$value
=
$this
->
iterator
->
current
(
)
;
$value
=
$this
->
didReadValue
(
$value
)
;
$this
->
value
=
$value
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 04:15 (4 d, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1114620
Default Alt Text
PhutilProxyIterator.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment