Page MenuHomeWickedGov Phorge

HookRunner.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

HookRunner.php

<?php
// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
namespace MobileFrontend\Hooks;
use MediaWiki\Context\IContextSource;
use MediaWiki\HookContainer\HookContainer;
use MediaWiki\Output\OutputPage;
use MobileContext;
use MobileFormatter;
use MobileFrontend\ContentProviders\IContentProvider;
use MobileFrontend\Features\FeaturesManager;
use Skin;
/**
* This is a hook runner class, see docs/Hooks.md in core.
* @internal
*/
class HookRunner implements
MobileFrontendBeforeDOMHook,
MobileFrontendContentProviderHook,
MobileFrontendFeaturesRegistrationHook,
RequestContextCreateSkinMobileHook,
SpecialMobileEditWatchlistImagesHook
{
private HookContainer $hookContainer;
public function __construct( HookContainer $hookContainer ) {
$this->hookContainer = $hookContainer;
}
/**
* @inheritDoc
*/
public function onMobileFrontendBeforeDOM( MobileContext $mobileContext, MobileFormatter $formatter ) {
return $this->hookContainer->run(
'MobileFrontendBeforeDOM',
[ $mobileContext, $formatter ]
);
}
/**
* @inheritDoc
*/
public function onMobileFrontendContentProvider( IContentProvider &$provider, OutputPage $out ) {
return $this->hookContainer->run(
'MobileFrontendContentProvider',
[ &$provider, $out ]
);
}
/**
* @inheritDoc
*/
public function onMobileFrontendFeaturesRegistration( FeaturesManager $featuresManager ) {
return $this->hookContainer->run(
'MobileFrontendFeaturesRegistration',
[ $featuresManager ]
);
}
/**
* @inheritDoc
*/
public function onRequestContextCreateSkinMobile( MobileContext $mobileContext, Skin $skin ) {
return $this->hookContainer->run(
'RequestContextCreateSkinMobile',
[ $mobileContext, $skin ]
);
}
/**
* @inheritDoc
*/
public function onSpecialMobileEditWatchlist__images( IContextSource $context, array &$watchlist, array &$images ) {
return $this->hookContainer->run(
'SpecialMobileEditWatchlist::images',
[ $context, &$watchlist, &$images ]
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 17:56 (9 h, 1 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
13/2b/dcaf5044f1b782c0e6720a95e38f
Default Alt Text
HookRunner.php (1 KB)

Event Timeline