Updated mediawiki/extensions
Project: mediawiki/extensions/SemanticMediaWiki  71dbba18481581625397b74eefd4242b7dda30b1

\SMW\ObservableDispatcher dispatches state changes from a source to an Observer

Code coverage: 100%
CRAP: 2

Instead of using the inheritance model or implementing an Observable interface
to communicate with attached Observers, the ObservableDispatcher can be used
as intermediary transmitter to notify Observers. The dispatcher inherits
all methods necessary (ObservableSubject) to communicate with an Observer,
and freeing the emitter of the state change from being an ObservableSubject
itself.

This also allows an Observer to become a DispatchableSource which can
inform other Observers independently from its own status.

## Example
Previous to this change PropertyChangeNotifier was a ObservableSubject which
would communicate/initiate direct communiction with Observers, now
that PropertyChangeNotifier is injected with an ObservableDispatcher it
does no longer need to establish any link rather expects state changes to
be dispatchd through ObservableSubjectDispatcher to those Observers that
are registered with it (in this case with ChangeObserver()).

- Before
$changeNotifier = new PropertyChangeNotifier( ... );
$changeNotifier->attach( new ChangeObserver() );

- After
$changeNotifier = new PropertyChangeNotifier( ... );
$changeNotifier->setDispatcher( new ObservableSubjectDispatcher( new ChangeObserver() ) );

Doing so avoids PropertyChangeNotifier being directly linked to the
Observer/Subject pattern and instead using a setter injection to establish
a connection such as:

SMW\ParserData->updateStore( )
SMW\PropertyChangeNotifier->detectChanges( )
SMW\PropertyChangeNotifier->compareConversionFactors( )
SMW\PropertyChangeNotifier->addDispatchJob( )
SMW\ObservableSubject->setState( )
SMW\ObservableSubject->notify( )
SMW\Observer->update( )
SMW\ChangeObserver->runUpdateDispatcher( )

Change-Id: I64c156006e9340aba57aba6b86d3b3c93a4b5c82