Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7404474
AddRedirectHeader.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
612 B
Referenced Files
None
Subscribers
None
AddRedirectHeader.php
View Options
<?php
namespace
MediaWiki\OutputTransform\Stages
;
use
MediaWiki\OutputTransform\ContentTextTransformStage
;
use
MediaWiki\Parser\ParserOptions
;
use
MediaWiki\Parser\ParserOutput
;
/**
* Adds RedirectHeader if it exists
* @internal
*/
class
AddRedirectHeader
extends
ContentTextTransformStage
{
public
function
shouldRun
(
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
$options
=
[]
):
bool
{
return
$po
->
getRedirectHeader
()
!==
null
;
}
protected
function
transformText
(
string
$text
,
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
&
$options
):
string
{
return
$po
->
getRedirectHeader
()
.
$text
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 19:11 (1 d, 2 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
93/69/b054736acc1eef99113fcacf7e45
Default Alt Text
AddRedirectHeader.php (612 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment