23use InvalidArgumentException;
53 if ( !isset(
$params[
'uri'] ) ) {
54 throw new InvalidArgumentException(
'RCFeeds must have a class set' );
56 if ( strpos(
$params[
'uri'],
'udp:' ) === 0 ) {
57 $params[
'class'] = UDPRCFeedEngine::class;
58 } elseif ( strpos(
$params[
'uri'],
'redis:' ) === 0 ) {
59 $params[
'class'] = RedisPubSubFeedEngine::class;
63 $scheme = parse_url(
$params[
'uri'], PHP_URL_SCHEME );
65 throw new InvalidArgumentException(
"Invalid RCFeed uri: {$params['uri']}" );
68 throw new InvalidArgumentException(
"Unknown RCFeed engine: $scheme" );
75 if ( defined(
'MW_PHPUNIT_TEST' ) && is_object( $class ) ) {
78 if ( !class_exists( $class ) ) {
79 throw new InvalidArgumentException(
"Unknown class '$class'." );
85class_alias( RCFeed::class,
'RCFeed' );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
array $params
The job parameters.
if(!defined('MW_SETUP_CALLBACK'))
Utility class for creating and reading rows in the recentchanges table.
$wgRCEngines
Config variable stub for the RCEngines setting, for use by phpdoc and IDEs.