Page MenuHomeWickedGov Phorge

ReadableNumericSerialMapping.php
No OneTemporary

Size
526 B
Referenced Files
None
Subscribers
None

ReadableNumericSerialMapping.php

<?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

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)

Event Timeline