31 $this->radix = $config[
'radix'] ?? 10;
32 $this->badIndexes = $config[
'badIndexes'] ?? [];
33 $this->uppercase = $config[
'uppercase'] ??
false;
37 $index = $this->adjustID( $index );
38 return \Wikimedia\base_convert( (
string)$index, 10, $this->radix, 1, !$this->uppercase );
48 private function adjustID(
int $id ): int {
51 return $this->badIndexes[$i];
53 count( $this->badIndexes ),
54 static function ( $a, $b ) {
59 return $pos ===
false ? $id : $id + $pos + 1;
A collection of static methods to play with arrays.