From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/libs/eventrelayer/EventRelayer.php | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 includes/libs/eventrelayer/EventRelayer.php (limited to 'includes/libs/eventrelayer/EventRelayer.php') diff --git a/includes/libs/eventrelayer/EventRelayer.php b/includes/libs/eventrelayer/EventRelayer.php new file mode 100644 index 00000000..f95ba3f0 --- /dev/null +++ b/includes/libs/eventrelayer/EventRelayer.php @@ -0,0 +1,65 @@ +doNotify( $channel, array( $event ) ); + } + + /** + * @param string $channel + * @param array $events List of event data maps + * @return bool Success + */ + final public function notifyMulti( $channel, $events ) { + return $this->doNotify( $channel, $events ); + } + + /** + * @param string $channel + * @param array $events List of event data maps + * @return bool Success + */ + abstract protected function doNotify( $channel, array $events ); +} + +/** + * No-op class for publishing messages into a PubSub system + */ +class EventRelayerNull extends EventRelayer { + public function doNotify( $channel, array $events ) { + return true; + } +} -- cgit v1.2.3-54-g00ecf