Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6121025
ReadableNumericSerialMapping.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
526 B
Referenced Files
None
Subscribers
None
ReadableNumericSerialMapping.php
View Options
<?php
namespace
MediaWiki\User\TempUser
;
/**
* Simple serial mapping for ASCII decimal numbers with hyphens for readability
*
* @since 1.44
*/
class
ReadableNumericSerialMapping
implements
SerialMapping
{
private
int
$offset
;
/**
* @param array $config
*/
public
function
__construct
(
$config
)
{
$this
->
offset
=
$config
[
'offset'
]
??
0
;
}
public
function
getSerialIdForIndex
(
int
$index
):
string
{
$mapped
=
(
string
)(
$index
+
$this
->
offset
);
return
rtrim
(
chunk_split
(
$mapped
,
5
,
'-'
),
'-'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 7 2026, 05:14 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f3/0c/9a9f30d2f2d2e287b28cbb9e1ba5
Default Alt Text
ReadableNumericSerialMapping.php (526 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment