Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4005377
UDPRCFeedEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
989 B
Referenced Files
None
Subscribers
None
UDPRCFeedEngine.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
namespace
MediaWiki\RCFeed
;
use
UDPTransport
;
/**
* Send recent change notifications to a destination address over UDP.
*
* Parameters:
* - `formatter`: (Required) Which RCFeedFormatter class to use.
* - `uri`: (Required) Where to send the messages.
*
* @par Example:
* @code
* $wgRCFeeds['rc-to-udp'] = [
* 'class' => 'UDPRCFeedEngine',
* 'formatter' => 'JSONRCFeedFormatter',
* 'uri' => 'udp://localhost:1336',
* ];
* @endcode
*
* @see $wgRCFeeds
* @since 1.22
* @ingroup RecentChanges
*/
class
UDPRCFeedEngine
extends
FormattedRCFeed
{
/**
* @see FormattedRCFeed::send
* @param array $feed
* @param string $line
* @return bool
*/
public
function
send
(
array
$feed
,
$line
)
{
$transport
=
UDPTransport
::
newFromString
(
$feed
[
'uri'
]
);
$transport
->
emit
(
$line
);
return
true
;
}
}
/** @deprecated class alias since 1.43 */
class_alias
(
UDPRCFeedEngine
::
class
,
'UDPRCFeedEngine'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 14 2026, 08:44 (14 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
21/a0/c598595ba3f84da97242efd838d4
Default Alt Text
UDPRCFeedEngine.php (989 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment