Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7428158
ExecutePostCacheTransformHooks.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
ExecutePostCacheTransformHooks.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\OutputTransform\Stages
;
use
MediaWiki\Config\ServiceOptions
;
use
MediaWiki\HookContainer\HookContainer
;
use
MediaWiki\HookContainer\HookRunner
;
use
MediaWiki\OutputTransform\ContentTextTransformStage
;
use
MediaWiki\Parser\ParserOptions
;
use
MediaWiki\Parser\ParserOutput
;
use
Psr\Log\LoggerInterface
;
/**
* @internal
* Runs the onParserOutputPostCacheTransform hook.
*/
class
ExecutePostCacheTransformHooks
extends
ContentTextTransformStage
{
private
HookContainer
$hookContainer
;
private
HookRunner
$hookRunner
;
public
function
__construct
(
ServiceOptions
$options
,
LoggerInterface
$logger
,
HookContainer
$hookContainer
)
{
parent
::
__construct
(
$options
,
$logger
);
$this
->
hookRunner
=
new
HookRunner
(
$hookContainer
);
$this
->
hookContainer
=
$hookContainer
;
}
public
function
shouldRun
(
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
$options
=
[]
):
bool
{
return
$this
->
hookContainer
->
isRegistered
(
'ParserOutputPostCacheTransform'
);
}
protected
function
transformText
(
string
$text
,
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
&
$options
):
string
{
$this
->
hookRunner
->
onParserOutputPostCacheTransform
(
$po
,
$text
,
$options
);
return
$text
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 09:20 (14 h, 34 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f0/2c/a82a3f0aa320a200ce4aa2c305da
Default Alt Text
ExecutePostCacheTransformHooks.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment