Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1429676
StaticHookRegistry.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
StaticHookRegistry.php
View Options
<?php
namespace
MediaWiki\HookContainer
;
/**
* This is a simple immutable HookRegistry which can be used to set up a local
* HookContainer in tests and for similar purposes.
*/
class
StaticHookRegistry
implements
HookRegistry
{
/** @var array */
private
$globalHooks
;
/** @var array */
private
$extensionHooks
;
/** @var DeprecatedHooks */
private
$deprecatedHooks
;
/**
* @param array $globalHooks An array of legacy hooks in the same format as $wgHooks
* @param array $extensionHooks An array of modern hooks in the format
* described in HookRegistry::getExtensionHooks()
* @param array $deprecatedHooksArray An array of deprecated hooks in the
* format expected by DeprecatedHooks::__construct(). These hooks are added
* to the core deprecated hooks list which is always present.
*/
public
function
__construct
(
array
$globalHooks
=
[],
array
$extensionHooks
=
[],
array
$deprecatedHooksArray
=
[]
)
{
$this
->
globalHooks
=
$globalHooks
;
$this
->
extensionHooks
=
$extensionHooks
;
$this
->
deprecatedHooks
=
new
DeprecatedHooks
(
$deprecatedHooksArray
);
}
public
function
getGlobalHooks
()
{
return
$this
->
globalHooks
;
}
public
function
getExtensionHooks
()
{
return
$this
->
extensionHooks
;
}
/**
* @return DeprecatedHooks
*/
public
function
getDeprecatedHooks
()
{
return
$this
->
deprecatedHooks
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 17:53 (8 h, 44 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ea/bd/34f156e554a7fafecfc9001182f0
Default Alt Text
StaticHookRegistry.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment