MediaWiki
REL1_35
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:29
Message\newFromSpecifier
static newFromSpecifier( $value)
Transform a MessageSpecifier or a primitive value used interchangeably with specifiers (a message key...
Definition
Message.php:452
UploadStashException
@newable
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
Stable for implementing.
Definition
MessageSpecifier.php:24
includes
upload
exception
UploadStashException.php
Generated on Sat Apr 6 2024 00:08:03 for MediaWiki by
1.9.8