Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1427313
ParserStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ParserStatus.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\Parser
;
use
MediaWiki\Extension\AbuseFilter\Parser\Exception\ExceptionBase
;
use
MediaWiki\Extension\AbuseFilter\Parser\Exception\UserVisibleWarning
;
class
ParserStatus
{
/** @var ExceptionBase|null */
protected
$excep
;
/** @var UserVisibleWarning[] */
protected
$warnings
;
/** @var int */
protected
$condsUsed
;
/**
* @param ExceptionBase|null $excep An exception thrown while parsing, or null if it parsed correctly
* @param UserVisibleWarning[] $warnings
* @param int $condsUsed
*/
public
function
__construct
(
?
ExceptionBase
$excep
,
array
$warnings
,
int
$condsUsed
)
{
$this
->
excep
=
$excep
;
$this
->
warnings
=
$warnings
;
$this
->
condsUsed
=
$condsUsed
;
}
/**
* @return ExceptionBase|null
*/
public
function
getException
():
?
ExceptionBase
{
return
$this
->
excep
;
}
/**
* @return UserVisibleWarning[]
*/
public
function
getWarnings
():
array
{
return
$this
->
warnings
;
}
/**
* @return int
*/
public
function
getCondsUsed
():
int
{
return
$this
->
condsUsed
;
}
/**
* Whether the parsing/evaluation happened successfully.
* @return bool
*/
public
function
isValid
():
bool
{
return
!
$this
->
excep
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 14:28 (1 d, 7 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
54/88/e3a877ef478a0ec4f120178eafaf
Default Alt Text
ParserStatus.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment