MediaWiki  master
ProtectedHookAccessorTrait.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
13 trait ProtectedHookAccessorTrait {
20  protected function getHookContainer() {
21  return MediaWikiServices::getInstance()->getHookContainer();
22  }
23 
32  protected function getHookRunner() {
33  return new HookRunner( $this->getHookContainer() );
34  }
35 }
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:158
MediaWiki\MediaWikiServices\getInstance
static getInstance()
Returns the global default instance of the top level service locator.
Definition: MediaWikiServices.php:189
MediaWiki\HookContainer
Definition: DeprecatedHooks.php:23