MediaWiki
REL1_31
FormattedRCFeed.php
Go to the documentation of this file.
1
<?php
26
abstract
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
) {
54
$params
=
$this->params
;
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
$line
Definition
cdb.php:59
FormattedRCFeed
Base class for RC feed engines that send messages in a freely configurable format to a uri-addressed ...
Definition
FormattedRCFeed.php:26
FormattedRCFeed\notify
notify(RecentChange $rc, $actionComment=null)
Definition
FormattedRCFeed.php:53
FormattedRCFeed\__construct
__construct(array $params=[])
Definition
FormattedRCFeed.php:35
FormattedRCFeed\$params
$params
Definition
FormattedRCFeed.php:27
FormattedRCFeed\send
send(array $feed, $line)
Send some text to the specified feed.
RCFeed
Definition
RCFeed.php:25
RecentChange
Utility class for creating new RC entries.
Definition
RecentChange.php:68
includes
rcfeed
FormattedRCFeed.php
Generated on Mon Nov 25 2024 15:35:14 for MediaWiki by
1.10.0