blob: b01682d65422cbd7018ec80ba4230e468660bc03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
/**
* Translatable page parse exception.
*
* @file
* @author Niklas Laxström
* @copyright Copyright © 2009-2013 Niklas Laxström
* @license GPL-2.0-or-later
*/
/**
* Class to signal syntax errors in translatable pages.
*
* @ingroup PageTranslation
*/
class TPException extends MWException {
protected $msg;
/**
* @todo Pass around Messages when Status class doesn't suck
* @param array $msg Message key with parameters
*/
public function __construct( array $msg ) {
$this->msg = $msg;
// Using ->plain() instead of ->text() due to bug T58226
$wikitext = call_user_func_array( 'wfMessage', $msg )->plain();
parent::__construct( $wikitext );
}
/**
* @return array
*/
public function getMsg() {
return $this->msg;
}
}
|