MediaWiki REL1_32
FormattedRCFeed.php
Go to the documentation of this file.
1<?php
26abstract class FormattedRCFeed extends RCFeed {
27 private $params;
28
35 public function __construct( array $params = [] ) {
36 $this->params = $params;
37 }
38
46 abstract public function send( array $feed, $line );
47
53 public function notify( RecentChange $rc, $actionComment = null ) {
56 $formatter = is_object( $params['formatter'] ) ? $params['formatter'] : new $params['formatter'];
57
58 $line = $formatter->getLine( $params, $rc, $actionComment );
59 if ( !$line ) {
60 // @codeCoverageIgnoreStart
61 // T109544 - If a feed formatter returns null, this will otherwise cause an
62 // error in at least RedisPubSubFeedEngine. Not sure best to handle this.
63 return;
64 // @codeCoverageIgnoreEnd
65 }
66 return $this->send( $params, $line );
67 }
68}
$line
Definition cdb.php:59
Base class for RC feed engines that send messages in a freely configurable format to a uri-addressed ...
notify(RecentChange $rc, $actionComment=null)
__construct(array $params=[])
send(array $feed, $line)
Send some text to the specified feed.
Utility class for creating new RC entries.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))