Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1425714
ParsingPlaceholderFactory.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
544 B
Referenced Files
None
Subscribers
None
ParsingPlaceholderFactory.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\Utilities
;
/**
* Create unique placeholders that can be used when parsing (wiki)text.
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @since 2020.07
*/
class
ParsingPlaceholderFactory
{
/** @var int */
private
$i
=
0
;
/** Return value is guaranteed to only contain [a-zA-Z0-9\x7f] */
public
function
make
():
string
{
return
"
\x
7fUNIQ"
.
dechex
(
mt_rand
(
0
,
0x7fffffff
)
)
.
dechex
(
mt_rand
(
0
,
0x7fffffff
)
)
.
'-'
.
$this
->
i
++;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 11:52 (18 h, 5 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e5/7d/602106a08996986cdd97585b3f3b
Default Alt Text
ParsingPlaceholderFactory.php (544 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment