MediaWiki
master
FormattedRCFeed.php
Go to the documentation of this file.
1
<?php
30
abstract
class
FormattedRCFeed
extends
RCFeed
{
31
private
$params;
32
36
public
function
__construct
( array $params ) {
37
$this->params =
$params
;
38
}
39
47
abstract
public
function
send
( array $feed, $line );
48
54
public
function
notify
(
RecentChange
$rc, $actionComment =
null
) {
55
$params = $this->params;
57
$formatter = is_object( $params[
'formatter'
] ) ? $params[
'formatter'
] :
new
$params[
'formatter'
];
58
59
$line = $formatter->getLine( $params, $rc, $actionComment );
60
if
( !$line ) {
61
// @codeCoverageIgnoreStart
62
// T109544 - If a feed formatter returns null, this will otherwise cause an
63
// error in at least RedisPubSubFeedEngine. Not sure best to handle this.
64
// @phan-suppress-next-line PhanTypeMismatchReturnProbablyReal
65
return
;
66
// @codeCoverageIgnoreEnd
67
}
68
return
$this->
send
( $params, $line );
69
}
70
}
$params
array $params
The job parameters.
Definition
UploadJobTrait.php:45
FormattedRCFeed
Base class for RCFeed implementations that use RCFeedFormatter.
Definition
FormattedRCFeed.php:30
FormattedRCFeed\notify
notify(RecentChange $rc, $actionComment=null)
Definition
FormattedRCFeed.php:54
FormattedRCFeed\__construct
__construct(array $params)
Definition
FormattedRCFeed.php:36
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:88
includes
rcfeed
FormattedRCFeed.php
Generated on Sat Apr 20 2024 06:23:45 for MediaWiki by
1.10.0