MediaWiki master
MediaWiki\RCFeed\RedisPubSubFeedEngine Class Reference

Send recent change to a Redis Pub/Sub channel. More...

Inherits MediaWiki\RCFeed\FormattedRCFeed.

Collaboration diagram for MediaWiki\RCFeed\RedisPubSubFeedEngine:

Public Member Functions

 send (array $feed, $line)
 
- Public Member Functions inherited from MediaWiki\RCFeed\FormattedRCFeed
 __construct (array $params)
 
 notify (RecentChange $rc, $actionComment=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\RCFeed\RCFeed
static factory (array $params)
 

Detailed Description

Send recent change to a Redis Pub/Sub channel.

If the feed URI contains a path component, it will be used to generate a channel name by stripping the leading slash and replacing any remaining slashes with '.'. If no path component is present, the channel is set to 'rc'. If the URI contains a query string, its parameters will be parsed as RedisConnectionPool options.

Parameters:

  • formatter: (Required) Which RCFeedFormatter class to use.
  • uri: (Required) Where to send the messages.
Example:
$wgRCFeeds['rc-to-redis'] = [
'class' => 'RedisPubSubFeedEngine',
'formatter' => 'JSONRCFeedFormatter',
'uri' => "redis://127.0.0.1:6379/rc.$wgDBname",
];
$wgRCFeeds
Config variable stub for the RCFeeds setting, for use by phpdoc and IDEs.
See also
$wgRCFeeds
Since
1.22

Definition at line 51 of file RedisPubSubFeedEngine.php.

Member Function Documentation

◆ send()

MediaWiki\RCFeed\RedisPubSubFeedEngine::send ( array $feed,
$line )
See also
FormattedRCFeed::send
Parameters
array$feed
string$line
Returns
bool

Reimplemented from MediaWiki\RCFeed\FormattedRCFeed.

Definition at line 59 of file RedisPubSubFeedEngine.php.

References wfGetUrlUtils().


The documentation for this class was generated from the following file: