MediaWiki  1.34.0
UploadStashException.php
Go to the documentation of this file.
1 <?php
28  protected $messageSpec;
29 
36  public function __construct( $messageSpec, $code = 0, $previous = null ) {
37  $this->messageSpec = $messageSpec;
38 
39  $msg = $this->getMessageObject()->text();
40  $msg = preg_replace( '!</?(var|kbd|samp|code)>!', '"', $msg );
41  $msg = Sanitizer::stripAllTags( $msg );
42  parent::__construct( $msg, $code, $previous );
43  }
44 
45  public function getMessageObject() {
46  return Message::newFromSpecifier( $this->messageSpec );
47  }
48 }
UploadStashException\$messageSpec
string array MessageSpecifier $messageSpec
Definition: UploadStashException.php:28
MessageSpecifier
Definition: MessageSpecifier.php:21
UploadStashException\__construct
__construct( $messageSpec, $code=0, $previous=null)
Definition: UploadStashException.php:36
UploadStashException\getMessageObject
getMessageObject()
Return a Message object for this exception.
Definition: UploadStashException.php:45
MWException
MediaWiki exception.
Definition: MWException.php:26
ILocalizedException
Interface for MediaWiki-localized exceptions.
Definition: ILocalizedException.php:27
UploadStashException
Definition: UploadStashException.php:26