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. | |
__wakeup () | |
Sanitize the callback parameter on wakeup, to avoid arbitrary execution. | |
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::__wakeup | ( | ) |
Sanitize the callback parameter on wakeup, to avoid arbitrary execution.
Definition at line 90 of file Status.php.
Status::cleanParams | ( | $ | params | ) | [protected] |
Definition at line 94 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.
Referenced by getWikiText().
Status::getErrorsArray | ( | ) |
Status::getItemXML | ( | $ | item | ) | [protected] |
Definition at line 105 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 135 of file Status.php.
References $s, cleanParams(), fatal(), wfMsgNoTrans(), and wfMsgReal().
Status::getXML | ( | ) |
Status::hasMessage | ( | $ | msg | ) |
Returns true if the specified message is present as a warning or error.
Definition at line 196 of file Status.php.
References $msg.
Status::isGood | ( | ) |
Definition at line 47 of file Status.php.
Status::isOK | ( | ) |
Definition at line 51 of file Status.php.
Status::merge | ( | $ | other, | |
$ | overwriteValue = false | |||
) |
static Status::newFatal | ( | $ | message | ) | [static] |
Factory function for fatal errors.
Reimplemented in FileRepoStatus.
Definition at line 28 of file Status.php.
References $result.
Referenced by HttpRequest::__construct(), and UploadFromUrl::fetchFile().
static Status::newGood | ( | $ | value = null |
) | [static] |
Definition at line 36 of file Status.php.
References $result, and $value.
Referenced by HttpRequest::__construct(), PoolCounter_Stub::acquire(), Article::doEdit(), RevDel_FileList::doPostCommitUpdates(), RevDel_ArchiveList::doPostCommitUpdates(), RevDel_RevisionList::doPostCommitUpdates(), RevDel_List::doPostCommitUpdates(), RevDel_FileList::doPreCommitUpdates(), RevDel_ArchiveList::doPreCommitUpdates(), RevDel_RevisionList::doPreCommitUpdates(), RevDel_List::doPreCommitUpdates(), PoolCounter_Stub::executeProtected(), PoolCounter::executeProtected(), UploadFromUrl::fetchFile(), UploadBase::fetchFile(), PoolCounter_Stub::release(), RevDel_List::setVisibility(), and PoolCounter_Stub::wait().
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().