Inherited by FileRepoStatus.
Public Member Functions | |
setResult ($ok, $value=null) | |
isGood () | |
isOK () | |
warning ($message) | |
error ($message) | |
Add an error, do not set fatal flag This can be used for non-fatal errors. | |
fatal ($message) | |
Add an error and set OK to false, indicating that the operation as a whole was fatal. | |
getXML () | |
Get the error list as XML. | |
getWikiText ($shortContext=false, $longContext=false) | |
Get the error list as a wikitext formatted list. | |
merge ($other, $overwriteValue=false) | |
Merge another status object into this one. | |
getErrorsArray () | |
hasMessage ($msg) | |
Returns true if the specified message is present as a warning or error. | |
Static Public Member Functions | |
static | newFatal ($message) |
Factory function for fatal errors. | |
static | newGood ($value=null) |
Public Attributes | |
$ok = true | |
$value | |
$successCount = 0 | |
Counters for batch operations. | |
$failCount = 0 | |
$errors = array() | |
$cleanCallback = false | |
Protected Member Functions | |
cleanParams ($params) | |
getItemXML ($item) |
"Good" means the operation was completed with no warnings or errors.
"OK" means the operation was partially or wholly completed.
An operation which is not OK should have errors so that the user can be informed as to what went wrong. Calling the fatal() function sets an error message and simultaneously switches off the OK flag.
Definition at line 15 of file Status.php.
Status::cleanParams | ( | $ | params | ) | [protected] |
Definition at line 87 of file Status.php.
References $i.
Referenced by getItemXML(), and getWikiText().
Status::error | ( | $ | message | ) |
Add an error, do not set fatal flag This can be used for non-fatal errors.
Definition at line 67 of file Status.php.
Status::fatal | ( | $ | message | ) |
Add an error and set OK to false, indicating that the operation as a whole was fatal.
Definition at line 78 of file Status.php.
References ok().
Referenced by getWikiText().
Status::getErrorsArray | ( | ) |
Status::getItemXML | ( | $ | item | ) | [protected] |
Definition at line 98 of file Status.php.
References cleanParams(), Xml::element(), and wfMsgReal().
Referenced by getXML().
Status::getWikiText | ( | $ | shortContext = false , |
|
$ | longContext = false | |||
) |
Get the error list as a wikitext formatted list.
string | $shortContext A short enclosing context message name, to be used when there is a single error | |
string | $longContext A long enclosing context message name, for a list |
Definition at line 128 of file Status.php.
References $error, $s, cleanParams(), fatal(), ok(), wfMsgNoTrans(), and wfMsgReal().
Status::getXML | ( | ) |
Get the error list as XML.
Definition at line 113 of file Status.php.
References $error, and getItemXML().
Status::hasMessage | ( | $ | msg | ) |
Returns true if the specified message is present as a warning or error.
Definition at line 186 of file Status.php.
Status::isGood | ( | ) |
Status::isOK | ( | ) |
Status::merge | ( | $ | other, | |
$ | overwriteValue = false | |||
) |
Merge another status object into this one.
Definition at line 164 of file Status.php.
References ok().
static Status::newFatal | ( | $ | message | ) | [static] |
Factory function for fatal errors.
Reimplemented in FileRepoStatus.
Definition at line 28 of file Status.php.
References $result.
static Status::newGood | ( | $ | value = null |
) | [static] |
Definition at line 36 of file Status.php.
References $result, and $value.
Referenced by Article::doEdit().
Status::setResult | ( | $ | ok, | |
$ | value = null | |||
) |
Status::warning | ( | $ | message | ) |
Definition at line 55 of file Status.php.
Status::$cleanCallback = false |
Definition at line 23 of file Status.php.
Status::$errors = array() |
Definition at line 22 of file Status.php.
Status::$failCount = 0 |
Definition at line 20 of file Status.php.
Status::$ok = true |
Status::$successCount = 0 |
Status::$value |
Definition at line 17 of file Status.php.
Referenced by newGood(), FileRepoStatus::newGood(), and setResult().