mediawiki-extensions-LoginN.../includes/Hooks/HookRunner.php
Umherirrender 222b7475fb Create HookRunner class
Only core hooks are run, but own HookRunner is recommended

Bug: T263353
Change-Id: I2506f4af21ef955a7feeb145d5173f46ca11b334
2023-06-05 22:47:00 +02:00

32 lines
659 B
PHP

<?php
namespace LoginNotify\Hooks;
use MediaWiki\HookContainer\HookContainer;
/**
* This is a hook runner class, see docs/Hooks.md in core.
* @internal
*/
class HookRunner implements
\MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook
{
private HookContainer $hookContainer;
public function __construct( HookContainer $hookContainer ) {
$this->hookContainer = $hookContainer;
}
/**
* @inheritDoc
*/
public function onAuthManagerLoginAuthenticateAudit( $response, $user,
$username, $extraData
) {
return $this->hookContainer->run(
'AuthManagerLoginAuthenticateAudit',
[ $response, $user, $username, $extraData ]
);
}
}