MediaWiki
REL1_40
UploadStashException.php
Go to the documentation of this file.
1
<?php
27
class
UploadStashException
extends
MWException
implements
ILocalizedException
{
29
protected
$messageSpec
;
30
37
public
function
__construct
(
$messageSpec
, $code = 0, Throwable $previous =
null
) {
38
$this->messageSpec =
$messageSpec
;
39
40
$msg = $this->
getMessageObject
()->text();
41
$msg = preg_replace(
'!</?(var|kbd|samp|code)>!'
,
'"'
, $msg );
42
$msg = Sanitizer::stripAllTags( $msg );
43
parent::__construct( $msg, $code, $previous );
44
}
45
46
public
function
getMessageObject
() {
47
return
Message::newFromSpecifier
( $this->messageSpec );
48
}
49
}
MWException
MediaWiki exception.
Definition
MWException.php:32
Message\newFromSpecifier
static newFromSpecifier( $value)
Transform a MessageSpecifier or a primitive value used interchangeably with specifiers (a message key...
Definition
Message.php:426
UploadStashException
Definition
UploadStashException.php:27
UploadStashException\$messageSpec
string array MessageSpecifier $messageSpec
Definition
UploadStashException.php:29
UploadStashException\getMessageObject
getMessageObject()
Return a Message object for this exception.
Definition
UploadStashException.php:46
UploadStashException\__construct
__construct( $messageSpec, $code=0, Throwable $previous=null)
Definition
UploadStashException.php:37
ILocalizedException
Interface for MediaWiki-localized exceptions.
Definition
ILocalizedException.php:29
MessageSpecifier
Definition
MessageSpecifier.php:24
includes
upload
exception
UploadStashException.php
Generated on Thu Jun 27 2024 14:04:28 for MediaWiki by
1.10.0