MediaWiki  1.23.13
FileRepoStatus Class Reference

Generic operation result class for FileRepo-related operations. More...

Inheritance diagram for FileRepoStatus:
Collaboration diagram for FileRepoStatus:

Public Member Functions

 __construct ( $repo=false)
 
- Public Member Functions inherited from Status
 __wakeup ()
 Sanitize the callback parameter on wakeup, to avoid arbitrary execution. More...
 
 error ( $message)
 Add an error, do not set fatal flag This can be used for non-fatal errors. More...
 
 fatal ( $message)
 Add an error and set OK to false, indicating that the operation as a whole was fatal. More...
 
 getErrorsArray ()
 Get the list of errors (but not warnings) More...
 
 getErrorsByType ( $type)
 Returns a list of status messages of the given type, with message and params left untouched, like a sane version of getStatusArray. More...
 
 getHTML ( $shortContext=false, $longContext=false)
 Get the error message as HTML. More...
 
 getMessage ( $shortContext=false, $longContext=false)
 Get the error list as a Message object. More...
 
 getValue ()
 
 getWarningsArray ()
 Get the list of warnings (but not errors) More...
 
 getWikiText ( $shortContext=false, $longContext=false)
 Get the error list as a wikitext formatted list. More...
 
 hasMessage ( $msg)
 Returns true if the specified message is present as a warning or error. More...
 
 isGood ()
 Returns whether the operation completed and didn't have any error or warnings. More...
 
 isOK ()
 Returns whether the operation completed. More...
 
 merge ( $other, $overwriteValue=false)
 Merge another status object into this one. More...
 
 replaceMessage ( $source, $dest)
 If the specified source message exists, replace it with the specified destination message, but keep the same parameters as in the original error. More...
 
 setResult ( $ok, $value=null)
 Change operation result. More...
 
 warning ( $message)
 Add a new warning. More...
 

Static Public Member Functions

static newFatal ( $repo)
 Factory function for fatal errors. More...
 
static newGood ( $repo=false, $value=null)
 
- Static Public Member Functions inherited from Status
static newGood ( $value=null)
 Factory function for good results. More...
 

Additional Inherited Members

- Public Attributes inherited from Status
callable $cleanCallback = false
 
array $errors = array()
 
int $failCount = 0
 
bool $ok = true
 
array $success = array()
 Array to indicate which items of the batch operations were successful. More...
 
int $successCount = 0
 Counters for batch operations. More...
 
mixed $value
 
- Protected Member Functions inherited from Status
 cleanParams ( $params)
 
 getErrorMessage ( $error)
 Return the message for a single error. More...
 
 getErrorMessageArray ( $errors)
 Return an array with the wikitext for each item in the array. More...
 
 getStatusArray ( $type)
 Returns a list of status messages of the given type. More...
 

Detailed Description

Generic operation result class for FileRepo-related operations.

Definition at line 28 of file FileRepoStatus.php.

Constructor & Destructor Documentation

◆ __construct()

FileRepoStatus::__construct (   $repo = false)
Parameters
bool | FileRepo$repo

Definition at line 59 of file FileRepoStatus.php.

Member Function Documentation

◆ newFatal()

static FileRepoStatus::newFatal (   $repo)
static

Factory function for fatal errors.

Parameters
FileRepo$repo
Returns
FileRepoStatus

Reimplemented from Status.

Definition at line 35 of file FileRepoStatus.php.

References $params, and array().

◆ newGood()

static FileRepoStatus::newGood (   $repo = false,
  $value = null 
)
static
Parameters
FileRepo | bool$repoDefault: false
$value
Returns
FileRepoStatus

Definition at line 49 of file FileRepoStatus.php.

References Status\$value.

Referenced by FileRepo\newGood().


The documentation for this class was generated from the following file: