MediaWiki master
MediaWiki\RecentChanges\ChangeTrackingEventIngress Class Reference

The ingress subscriber for the change tracking component. More...

Inherits MediaWiki\DomainEvent\EventSubscriberBase.

Collaboration diagram for MediaWiki\RecentChanges\ChangeTrackingEventIngress:

Public Member Functions

 __construct (ChangeTagsStore $changeTagsStore, UserEditTracker $userEditTracker)
 
 handlePageUpdatedEventAfterCommit (PageUpdatedEvent $event)
 Listener method for PageUpdatedEvent, to be registered with an DomainEventSource.
 
- Public Member Functions inherited from MediaWiki\DomainEvent\EventSubscriberBase
 initSubscriber (array $options)
 Called by DomainEventDispatcher to provide access to the list of events to subscribe to and any other relevant information from the extension.json.
 
 registerListeners (DomainEventSource $eventSource)
 This default implementation of registerListeners() will automatically register a listener method for each event passed to initEvents() or initSubscriber().
 

Static Public Member Functions

static newForTesting (ChangeTagsStore $changeTagsStore, UserEditTracker $userEditTracker)
 

Public Attributes

const EVENTS
 The events handled by this ingress subscriber.
 
const OBJECT_SPEC
 Object spec used for lazy instantiation.
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWiki\DomainEvent\EventSubscriberBase
 initEvents (array $events)
 May be called from the constructor of subclasses that want to directly specify the list of events.
 
 registerListenerMethod (DomainEventSource $eventSource, string $eventType, ?string $method=null)
 

Detailed Description

The ingress subscriber for the change tracking component.

It updates change tracking state according to domain events coming from other components.

Access: internal

Definition at line 20 of file ChangeTrackingEventIngress.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\ChangeTrackingEventIngress::__construct ( ChangeTagsStore $changeTagsStore,
UserEditTracker $userEditTracker )
Parameters
ChangeTagsStore$changeTagsStore
UserEditTracker$userEditTracker

Definition at line 55 of file ChangeTrackingEventIngress.php.

Member Function Documentation

◆ handlePageUpdatedEventAfterCommit()

◆ newForTesting()

static MediaWiki\RecentChanges\ChangeTrackingEventIngress::newForTesting ( ChangeTagsStore $changeTagsStore,
UserEditTracker $userEditTracker )
static

Definition at line 64 of file ChangeTrackingEventIngress.php.

Member Data Documentation

◆ EVENTS

const MediaWiki\RecentChanges\ChangeTrackingEventIngress::EVENTS
Initial value:
= [
PageUpdatedEvent::TYPE
]

The events handled by this ingress subscriber.

See also
registerListeners()

Definition at line 26 of file ChangeTrackingEventIngress.php.

◆ OBJECT_SPEC

const MediaWiki\RecentChanges\ChangeTrackingEventIngress::OBJECT_SPEC
Initial value:
= [
'class' => self::class,
'services' => [
'ChangeTagsStore',
'UserEditTracker'
],
'events' => [
PageUpdatedEvent::TYPE
],
]

Object spec used for lazy instantiation.

Using this spec with DomainEventSource::registerSubscriber defers instantiation until one of the listed events is dispatched. Declaring it as a constant avoids the overhead of using reflection for auto-wiring.

Definition at line 37 of file ChangeTrackingEventIngress.php.


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