. * * @file * @ingroup extensions */ namespace Popups\EventLogging; use ExtensionRegistry; class MWEventLogger implements EventLogger { /** * @var ExtensionRegistry */ private $registry; /** * @param ExtensionRegistry $registry MediaWiki extension registry */ public function __construct( ExtensionRegistry $registry ) { $this->registry = $registry; } /** * Log event * * @param array $event An associative array containing event data */ public function log( array $event ) { $eventLoggingSchemas = $this->registry->getAttribute( 'EventLoggingSchemas' ); \EventLogging::logEvent( self::PREVIEWS_SCHEMA_NAME, $eventLoggingSchemas[ self::PREVIEWS_SCHEMA_NAME ], $event ); } }