1 | <?php |
||
17 | class EscapingEntityIdFormatter implements EntityIdFormatter { |
||
18 | |||
19 | /** |
||
20 | * @var EntityIdFormatter |
||
21 | */ |
||
22 | private $formatter; |
||
23 | |||
24 | /** |
||
25 | * @var callable |
||
26 | */ |
||
27 | private $escapeCallback; |
||
28 | |||
29 | /** |
||
30 | * @param EntityIdFormatter $formatter A formatter returning plain text. |
||
31 | * @param callable $escapeCallback A callable taking plain text and returning escaped text. |
||
32 | * |
||
33 | * @throws InvalidArgumentException |
||
34 | 1 | */ |
|
35 | 1 | public function __construct( EntityIdFormatter $formatter, $escapeCallback ) { |
|
43 | |||
44 | /** |
||
45 | * @see EntityIdFormatter::formatEntityId |
||
46 | * |
||
47 | * @param EntityId $value |
||
48 | * |
||
49 | 1 | * @return string Typically wikitext or HTML, depending on the $escapeCallback provided. |
|
50 | 1 | */ |
|
51 | 1 | public function formatEntityId( EntityId $value ) { |
|
56 | |||
57 | } |
||
58 |