Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430492
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, May 16, 18:49 (5 h, 46 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
74/42/af5f44abcdf62b76e2e98ab39e2d
Default Alt Text
AddRedirectHeader.php (612 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment