Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5974280
CallbackIterator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
573 B
Referenced Files
None
Subscribers
None
CallbackIterator.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\Iterator
;
use
Iterator
;
use
IteratorDecorator
;
/**
* Applies a callback to all values returned from the iterator
*/
class
CallbackIterator
extends
IteratorDecorator
{
/** @var callable */
protected
$callable
;
public
function
__construct
(
Iterator
$iterator
,
$callable
)
{
parent
::
__construct
(
$iterator
);
$this
->
callable
=
$callable
;
}
public
function
current
()
{
return
call_user_func
(
$this
->
callable
,
$this
->
iterator
->
current
()
);
}
}
class_alias
(
CallbackIterator
::
class
,
'EchoCallbackIterator'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 17:16 (1 d, 12 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ba/26/4b808650a5dd7f58c97d33b324e5
Default Alt Text
CallbackIterator.php (573 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment