46 if ( !isset( $params[
'class'] ) ) {
47 if ( !isset( $params[
'uri'] ) ) {
48 throw new InvalidArgumentException(
'RCFeeds must have a class set' );
50 if ( strpos( $params[
'uri'],
'udp:' ) === 0 ) {
51 $params[
'class'] = UDPRCFeedEngine::class;
52 } elseif ( strpos( $params[
'uri'],
'redis:' ) === 0 ) {
53 $params[
'class'] = RedisPubSubFeedEngine::class;
57 $scheme = parse_url( $params[
'uri'], PHP_URL_SCHEME );
59 throw new InvalidArgumentException(
"Invalid RCFeed uri: {$params['uri']}" );
62 throw new InvalidArgumentException(
"Unknown RCFeed engine: $scheme" );
68 $class = $params[
'class'];
69 if ( defined(
'MW_PHPUNIT_TEST' ) && is_object( $class ) ) {
72 if ( !class_exists( $class ) ) {
73 throw new InvalidArgumentException(
"Unknown class '$class'." );
75 return new $class( $params );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(!defined('MW_SETUP_CALLBACK'))
__construct(array $params=[])
static factory(array $params)
notify(RecentChange $rc, $actionComment=null)
Dispatch the recent changes notification.
Utility class for creating new RC entries.
$wgRCEngines
Config variable stub for the RCEngines setting, for use by phpdoc and IDEs.