Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
StringMangler.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\MessageProcessing;
5
18interface StringMangler {
20 public function setConf( array $configuration ): void;
21
27 public function matches( string $key ): bool;
28
30 public function mangle( string $key ): string;
31
38 public function mangleList( array $list ): array;
39
46 public function mangleArray( array $array ): array;
47
49 public function unmangle( string $key ): string;
50
57 public function unmangleList( array $list ): array;
58
65 public function unmangleArray( array $array ): array;
66}
Interface that key-mangling classes must implement.
unmangle(string $key)
Reverse mangling of a string.
mangleList(array $list)
Mangle a list of strings.
setConf(array $configuration)
General way to pass configuration to the mangler.
matches(string $key)
Match strings against a pattern.
mangleArray(array $array)
Mangle the keys of an array.
unmangleList(array $list)
Reverse mangling a list of strings.
unmangleArray(array $array)
Reverse mangling of the keys of an array.