Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Notifications\ChangeNotifier Class Reference

Class for generating and submitting change notifications in different situations. More...

Public Member Functions

 __construct (WikiPageActionEntityChangeFactory $changeFactory, array $changeTransmitters)
 
 notifyOnPageDeleted (EntityContent $content, UserIdentity $user, $timestamp)
 This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was deleted.
 

Private Member Functions

 transmitChange (EntityChange $change)
 Transmit changes via all registered transmitters.
 

Private Attributes

 $changeTransmitters
 
 $changeFactory
 

Detailed Description

Class for generating and submitting change notifications in different situations.

This is a helper intended for use in hook handler functions.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Notifications\ChangeNotifier::__construct ( WikiPageActionEntityChangeFactory $changeFactory,
array $changeTransmitters )

Member Function Documentation

◆ notifyOnPageDeleted()

Wikibase\Repo\Notifications\ChangeNotifier::notifyOnPageDeleted ( EntityContent $content,
UserIdentity $user,
$timestamp )

This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was deleted.

Parameters
EntityContent$content
UserIdentity$user
string$timestamptimestamp in TS_MW format.
Exceptions
InvalidArgumentException
ChangeTransmitterException
Returns
EntityChange|null

◆ transmitChange()

Wikibase\Repo\Notifications\ChangeNotifier::transmitChange ( EntityChange $change)
private

Transmit changes via all registered transmitters.

Parameters
EntityChange$change

Member Data Documentation

◆ $changeFactory

Wikibase\Repo\Notifications\ChangeNotifier::$changeFactory
private

◆ $changeTransmitters

Wikibase\Repo\Notifications\ChangeNotifier::$changeTransmitters
private

The documentation for this class was generated from the following file: