mediawiki-extensions-Echo/Notifier.php
Andrew Garrett 8da85396d6 Initial commit of Echo, a notifications framework for MediaWiki.
This version is very rough.

For an example set of Minimum Releasable Functionality, this version will notify users on
changes to their watchlists or to their user talk pages.

However, it is still missing a conversion script to turn watchlists into echo subscriptions.

For now, notifications can be viewed through the new special page Special:Notifications, or through the API module provided.

Change-Id: I5867226e3e6195fbed81f4b5803e2310f057ffc4
2012-05-13 00:53:21 +10:00

26 lines
635 B
PHP

<?php
// @todo Fill in
class EchoNotifier {
/**
* Record an EchoNotification for an EchoEvent.
*
* @todo Implement.
* @param $user The User to notify.
* @param $event The EchoEvent to notify about.
*/
public static function notifyWithNotification( $user, $event ) {
EchoNotification::create( array( 'user' => $user, 'event' => $event) );
}
/**
* Send a Notification to a user by email
*
* @todo Implement.
* @param $user The User to notify.
* @param $event The EchoEvent to notify about.
*/
public static function notifyWithEmail( $user, $event ) {
// throw new MWException( "Not implemented" );
}
}