Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6057712
ExpandToAbsoluteUrls.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
681 B
Referenced Files
None
Subscribers
None
ExpandToAbsoluteUrls.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\OutputTransform\Stages
;
use
MediaWiki\Linker\Linker
;
use
MediaWiki\OutputTransform\ContentTextTransformStage
;
use
MediaWiki\Parser\ParserOptions
;
use
MediaWiki\Parser\ParserOutput
;
/**
* Expand relative links to absolute URLs
* @internal
*/
class
ExpandToAbsoluteUrls
extends
ContentTextTransformStage
{
public
function
shouldRun
(
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
$options
=
[]
):
bool
{
return
$options
[
'absoluteURLs'
]
??
false
;
}
protected
function
transformText
(
string
$text
,
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
&
$options
):
string
{
return
Linker
::
expandLocalLinks
(
$text
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 01:26 (8 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7a/d4/8425430f9a671f7153034462f4ea
Default Alt Text
ExpandToAbsoluteUrls.php (681 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment