MediaWiki
master
|
Generic operation result class Has warning/error list, boolean status and arbitrary value. More...
Public Member Functions | |
__construct (StatusValue $sv=null) | |
__get ($name) | |
Backwards compatibility logic. More... | |
__set ($name, $value) | |
Backwards compatibility logic. More... | |
__sleep () | |
Don't save the callback when serializing, because Closures can't be serialized and we're going to clear it in __wakeup anyway. More... | |
__toString () | |
__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, $lang=null) | |
Get the error message as HTML. More... | |
getMessage ($shortContext=false, $longContext=false, $lang=null) | |
Get a bullet list of the errors as a Message object. More... | |
getStatusValue () | |
Returns the wrapped StatusValue object. More... | |
getValue () | |
getWarningsArray () | |
Get the list of warnings (but not errors) More... | |
getWikiText ($shortContext=false, $longContext=false, $lang=null) | |
Get the error list as a wikitext formatted list. More... | |
hasMessage ($message) | |
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 ($message) |
Factory function for fatal errors. More... | |
static | newGood ($value=null) |
Factory function for good results. More... | |
static | wrap ($sv) |
Succinct helper method to wrap a StatusValue. More... | |
Public Attributes | |
callable | $cleanCallback = false |
int | $failCount = 0 |
Counter for batch operations. More... | |
array | $success = [] |
Map of (key => bool) to indicate success of each part of batch operations. More... | |
int | $successCount = 0 |
Counter for batch operations. More... | |
mixed | $value |
Protected Member Functions | |
cleanParams (array $params) | |
getErrorMessage ($error, $lang=null) | |
Return the message for a single error. More... | |
getErrorMessageArray ($errors, $lang=null) | |
Return an array with a Message object for each error. More... | |
getStatusArray ($type=false) | |
Returns a list of status messages of the given type (or all if false) More... | |
languageFromParam ($lang) | |
Protected Attributes | |
StatusValue | $sv |
Generic operation result class Has warning/error list, boolean status and arbitrary value.
"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.
The recommended pattern for Status objects is to return a Status object unconditionally, i.e. both on success and on failure – so that the developer of the calling code is reminded that the function can fail, and so that a lack of error-handling will be explicit.
Definition at line 40 of file Status.php.
Status::__construct | ( | StatusValue | $sv = null | ) |
Status::__get | ( | $name | ) |
Backwards compatibility logic.
string | $name |
Definition at line 487 of file Status.php.
References $name.
Status::__set | ( | $name, | |
$value | |||
) |
Backwards compatibility logic.
string | $name | |
mixed | $value |
Definition at line 502 of file Status.php.
Status::__sleep | ( | ) |
Don't save the callback when serializing, because Closures can't be serialized and we're going to clear it in __wakeup anyway.
Definition at line 524 of file Status.php.
References $keys.
Status::__toString | ( | ) |
Definition at line 516 of file Status.php.
Status::__wakeup | ( | ) |
Sanitize the callback parameter on wakeup, to avoid arbitrary execution.
Definition at line 532 of file Status.php.
|
protected |
array | $params |
Definition at line 179 of file Status.php.
Referenced by getErrorMessage().
Status::error | ( | $message | ) |
Add an error, do not set fatal flag This can be used for non-fatal errors.
Definition at line 161 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 171 of file Status.php.
Referenced by EditPage\runPostMergeFilters().
|
protected |
Return the message for a single error.
mixed | $error | With an array & two values keyed by 'message' and 'params', use those keys-value pairs. Otherwise, if its an array, just use the first value as the message and the remaining items as the params. |
string | Language | $lang | Language to use for processing messages |
Definition at line 324 of file Status.php.
References $lang, cleanParams(), languageFromParam(), and wfMessage().
Referenced by getErrorMessageArray(), getMessage(), and getWikiText().
|
protected |
Return an array with a Message object for each error.
Definition at line 366 of file Status.php.
References $e, $lang, getErrorMessage(), languageFromParam(), and use.
Referenced by getMessage(), and getWikiText().
Status::getErrorsArray | ( | ) |
Get the list of errors (but not warnings)
Definition at line 390 of file Status.php.
References getStatusArray().
Referenced by CliInstaller\showStatusMessage(), and WebInstaller\showStatusMessage().
Status::getErrorsByType | ( | $type | ) |
Returns a list of status messages of the given type, with message and params left untouched, like a sane version of getStatusArray.
Each entry is a map of:
string | $type |
Definition at line 445 of file Status.php.
References $type.
Referenced by ApiErrorFormatter_BackCompat\arrayFromStatus().
Get the error message as HTML.
This is done by parsing the wikitext error message.
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 |
string | Language | $lang | Language to use for processing messages |
Definition at line 353 of file Status.php.
References $lang, $out, getWikiText(), languageFromParam(), and MessageCache\singleton().
Referenced by StatusTest\testGetHtml().
Get a bullet list of the errors as a Message object.
$shortContext and $longContext can be used to wrap the error list in some text. $shortContext will be preferred when there is a single error; $longContext will be preferred when there are multiple ones. In either case, $1 will be replaced with the list of errors.
$shortContext is assumed to use $1 as an inline parameter: if there is a single item, it will not be made into a list; if there are multiple items, newlines will be inserted around the list. $longContext is assumed to use $1 as a standalone parameter; it will always receive a list.
If both parameters are missing, and there is only one error, no bullet will be added.
string|string[] | $shortContext A message name or an array of message names. | |
string|string[] | $longContext A message name or an array of message names. | |
string | Language | $lang | Language to use for processing messages |
Definition at line 273 of file Status.php.
References $lang, $s, getErrorMessage(), getErrorMessageArray(), languageFromParam(), and wfMessage().
Referenced by LocalFileLockError\__construct(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider\setPasswordResetFlag(), and StatusTest\testGetMessage().
|
protected |
Returns a list of status messages of the given type (or all if false)
string | bool | $type |
Definition at line 413 of file Status.php.
Referenced by getErrorsArray(), and getWarningsArray().
Status::getStatusValue | ( | ) |
Returns the wrapped StatusValue object.
Definition at line 123 of file Status.php.
References $sv.
Status::getValue | ( | ) |
Definition at line 478 of file Status.php.
Status::getWarningsArray | ( | ) |
Get the list of warnings (but not errors)
Definition at line 401 of file Status.php.
References getStatusArray().
Referenced by CliInstaller\showStatusMessage(), and WebInstaller\showStatusMessage().
Get the error list as a wikitext formatted list.
string | bool | $shortContext | A short enclosing context message name, to be used when there is a single error |
string | bool | $longContext | A long enclosing context message name, for a list |
string | Language | $lang | Language to use for processing messages |
Definition at line 217 of file Status.php.
References $lang, $s, as, getErrorMessage(), getErrorMessageArray(), languageFromParam(), and wfMessage().
Referenced by getHTML(), EditPage\handleStatus(), and StatusTest\testGetWikiText().
Status::hasMessage | ( | $message | ) |
Returns true if the specified message is present as a warning or error.
Definition at line 456 of file Status.php.
Status::isGood | ( | ) |
Returns whether the operation completed and didn't have any error or warnings.
Definition at line 133 of file Status.php.
Referenced by ApiErrorFormatter\addMessagesFromStatus(), ApiErrorFormatter\arrayFromStatus(), ApiErrorFormatter_BackCompat\arrayFromStatus(), SpecialChangeEmail\attemptChange(), SpecialChangeEmailPreAuthManager\attemptChange(), SpecialEmailUser\execute(), LocalFileDeleteBatch\execute(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider\setPasswordResetFlag(), and HTMLForm\show().
Status::isOK | ( | ) |
Returns whether the operation completed.
Definition at line 142 of file Status.php.
Referenced by CliInstaller\showStatusMessage().
|
protected |
string | Language | null | $lang | Language to use for processing messages, or null to default to the user language. |
Definition at line 195 of file Status.php.
References $lang, $wgLang, Language\factory(), and global.
Referenced by getErrorMessage(), getErrorMessageArray(), getHTML(), getMessage(), and getWikiText().
Status::merge | ( | $other, | |
$overwriteValue = false |
|||
) |
Merge another status object into this one.
Status | $other | Other Status object |
bool | $overwriteValue | Whether to override the "value" member |
Definition at line 379 of file Status.php.
Referenced by ScopedLock\factory(), and FileOpBatch\runParallelBatches().
|
static |
Factory function for fatal errors.
Definition at line 89 of file Status.php.
Referenced by MWHttpRequest\__construct(), UploadFromChunks\addChunk(), LoginFormPreAuthManager\addNewAccountInternal(), User\addToDatabase(), FileOp\attempt(), SpecialChangeEmail\attemptChange(), SpecialChangeEmailPreAuthManager\attemptChange(), SpecialChangePasswordPreAuthManager\attemptReset(), MediaWiki\Auth\AuthManager\autoCreateUser(), ChangeTags\canActivateTag(), ChangeTags\canAddTagsAccompanyingChange(), MediaWiki\Auth\AuthManager\canCreateAccount(), ChangeTags\canCreateTag(), ChangeTags\canDeactivateTag(), ChangeTags\canDeleteTag(), ChangeTags\canUpdateTags(), MediaWiki\Auth\AuthManager\checkAccountCreatePermissions(), FileBackend\clean(), ImportReporter\close(), UploadBase\convertVerifyErrorToStatus(), FileBackendStore\createInternal(), Installer\createSysop(), SqliteInstaller\dataDirOKmaybeCreate(), SpecialRedirect\dispatch(), FileDeleteForm\doDelete(), WikiPage\doEditContent(), Installer\doEnvironmentChecks(), SwiftFileBackend\doExecuteOpHandlesInternal(), SpecialImport\doImport(), FileBackend\doOperations(), FileBackendStore\doOperationsInternal(), FileBackend\doQuickOperations(), WatchAction\doUnwatch(), WikiPage\doUpdateRestrictions(), WatchAction\doWatch(), SpecialChangeCredentials\execute(), PoolCounterWork\execute(), CliInstaller\execute(), ZipDirectoryReader\execute(), LoginSignupSpecialPage\execute(), UploadFromUrl\fetchFile(), UserrightsPage\fetchUser(), PoolCounterRedis\getConnection(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\getPasswordResetData(), WebInstallerExistingWiki\handleExistingUpgrade(), BotPassword\login(), LoginFormPreAuthManager\mailPasswordInternal(), LoginSignupSpecialPage\mainLoginForm(), SqliteInstaller\makeStubDBFile(), User\newFatalPermissionDeniedStatus(), ImportStreamSource\newFromFile(), ImportStreamSource\newFromInterwiki(), ImportStreamSource\newFromUpload(), ImportStreamSource\newFromURL(), SpecialUnlockdb\onSubmit(), SpecialLockdb\onSubmit(), SpecialRandomInCategory\onSubmit(), SpecialChangeContentModel\onSubmit(), SpecialExpandTemplates\onSubmitInput(), FormatJson\parse(), DatabaseInstaller\populateInterwikiTable(), FileOp\precheck(), PoolCounter\precheckAcquire(), FileBackend\prepare(), AbstractContent\prepareSave(), MediaWiki\Auth\AuthManagerTest\provideAllowsAuthenticationDataChange(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), MediaWiki\Auth\LegacyHookPreAuthenticationProviderTest\provideTestForAccountCreation(), FileBackend\publish(), UploadFromUrl\reallyFetchFile(), PoolCounterRedis\release(), LocalFileDeleteBatch\removeNonexistentFiles(), LocalFileRestoreBatch\removeNonexistentFiles(), LocalFileMoveBatch\removeNonexistentFiles(), ChangeTags\restrictedTagError(), AssembleUploadChunksJob\run(), PublishStashedFileJob\run(), SpecialBotPasswords\save(), FileBackend\secure(), UserMailer\send(), UserMailer\sendInternal(), UserMailer\sendWithPear(), User\setEmailWithConfirmation(), SqliteInstaller\setupDatabase(), PostgresInstaller\setupPLpgSQL(), PostgresInstaller\setupSchema(), PostgresInstaller\setupUser(), RevDelList\setVisibility(), FileBackendStore\storeInternal(), MediaTransformOutput\streamFileWithStatus(), WebInstallerDBConnect\submit(), SpecialEditTags\submit(), PostgresInstaller\submitConnectForm(), OracleInstaller\submitConnectForm(), MysqlInstaller\submitConnectForm(), MssqlInstaller\submitConnectForm(), EmailConfirmation\submitSend(), PostgresInstaller\submitSettingsForm(), MssqlInstaller\submitSettingsForm(), MysqlInstaller\submitSettingsForm(), DatabaseInstaller\submitWebUserBox(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoAccountCreation(), MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProviderTest\testBeginSecondaryAccountCreation(), MediaWiki\Auth\AuthManagerTest\testCanCreateAccount(), MediaWiki\Auth\AuthManagerTest\testCheckAccountCreatePermissions(), PasswordResetTest\testIsAllowed(), BotPasswordTest\testLogin(), StatusTest\testNewFatalWithMessage(), StatusTest\testNewFatalWithString(), StatusTest\testOkAndErrors(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationDataEmail(), SpecialUploadStash\tryClearStashedUploads(), Preferences\tryFormSubmit(), AuthManagerSpecialPage\trySubmit(), PageArchive\undeleteRevisions(), ChangeTags\updateTagsWithChecks(), and PoolCounterRedis\waitForSlotOrNotif().
|
static |
Factory function for good results.
mixed | $value |
Definition at line 101 of file Status.php.
Referenced by MWHttpRequest\__construct(), FileBackendMultiWrite\accessibilityCheck(), PoolCounter_Stub\acquireForAnyone(), PoolCounter_Stub\acquireForMe(), RevDelList\acquireItemLocks(), ChangeTags\activateTagWithChecks(), SwiftFileBackend\addMissingMetadata(), ChangeTags\addTagsAccompanyingChangeWithChecks(), User\addToDatabase(), MediaWiki\Auth\AuthManager\allowsAuthenticationDataChange(), FileOpBatch\attempt(), FileOp\attempt(), SpecialChangePasswordPreAuthManager\attemptReset(), MediaWiki\Auth\AuthManager\autoCreateUser(), ChangeTags\canActivateTag(), ChangeTags\canAddTagsAccompanyingChange(), MediaWiki\Auth\AuthManager\canCreateAccount(), ChangeTags\canCreateTag(), ChangeTags\canDeactivateTag(), ChangeTags\canDeleteTag(), ChangeTags\canUpdateTags(), User\changeAuthenticationData(), MWRestrictions\check(), MediaWiki\Auth\AuthManager\checkAccountCreatePermissions(), PasswordPolicyChecks\checkMaximalPasswordLength(), PasswordPolicyChecks\checkMinimalPasswordLength(), PasswordPolicyChecks\checkMinimumPasswordLengthToLogin(), PasswordPolicyChecks\checkPasswordCannotMatchBlacklist(), PasswordPolicyChecks\checkPasswordCannotMatchUsername(), User\checkPasswordValidity(), UserPasswordPolicy\checkPolicies(), PasswordPolicyChecks\checkPopularPasswordBlacklist(), SqliteInstaller\checkPrerequisites(), DatabaseInstaller\checkPrerequisites(), LocalRepo\cleanupDeletedBatch(), ImportReporter\close(), FSLockManager\closeLockHandles(), PostgresInstaller\commitChanges(), FileBackendStore\concatenate(), FileBackendMultiWrite\consistencyCheck(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider\continueLinkAttempt(), SwiftFileBackend\createContainer(), Installer\createMainpage(), Installer\createSysop(), ChangeTags\createTagWithChecks(), SqliteInstaller\dataDirOKmaybeCreate(), ChangeTags\deactivateTagWithChecks(), SwiftFileBackend\deleteContainer(), ChangeTags\deleteTagEverywhere(), FileBackendStore\describeInternal(), FileOp\doAttempt(), CreateFileOp\doAttempt(), StoreFileOp\doAttempt(), CopyFileOp\doAttempt(), MoveFileOp\doAttempt(), FileBackendStore\doClean(), FSFileBackend\doCleanInternal(), FileBackendStore\doCleanInternal(), SwiftFileBackend\doCleanInternal(), FileBackendStore\doConcatenate(), MemoryFileBackend\doCopyInternal(), FSFileBackend\doCopyInternal(), SwiftFileBackend\doCopyInternal(), WikiPage\doCreate(), MemoryFileBackend\doCreateInternal(), FSFileBackend\doCreateInternal(), SwiftFileBackend\doCreateInternal(), WikiPage\doDeleteArticleReal(), MemoryFileBackend\doDeleteInternal(), FSFileBackend\doDeleteInternal(), SwiftFileBackend\doDeleteInternal(), FileBackendStore\doDescribeInternal(), SwiftFileBackend\doDescribeInternal(), FileBackendMultiWrite\doDirectoryOp(), WikiPage\doEditContent(), Installer\doEnvironmentChecks(), FSFileBackend\doExecuteOpHandlesInternal(), SwiftFileBackend\doExecuteOpHandlesInternal(), MemcLockManager\doFreeLocksOnServer(), Installer\doGenerateKeys(), MemcLockManager\doGetLocksOnServer(), MySqlLockManager\doGetLocksOnServer(), PostgreSqlLockManager\doGetLocksOnServer(), FSLockManager\doLock(), NullLockManager\doLock(), QuorumLockManager\doLockByType(), LockManager\doLockByType(), QuorumLockManager\doLockingRequestBucket(), DBFileJournal\doLogChangeBatch(), NullFileJournal\doLogChangeBatch(), WikiPage\doModify(), FSFileBackend\doMoveInternal(), SwiftFileBackend\doMoveInternal(), FileBackend\doOperations(), FileBackendMultiWrite\doOperationsInternal(), FileBackendStore\doOperationsInternal(), RevDelArchiveList\doPostCommitUpdates(), RevDelFileList\doPostCommitUpdates(), RevDelRevisionList\doPostCommitUpdates(), RevDelList\doPostCommitUpdates(), FileOp\doPrecheck(), CreateFileOp\doPrecheck(), StoreFileOp\doPrecheck(), CopyFileOp\doPrecheck(), MoveFileOp\doPrecheck(), DeleteFileOp\doPrecheck(), DescribeFileOp\doPrecheck(), RevDelArchiveList\doPreCommitUpdates(), RevDelFileList\doPreCommitUpdates(), RevDelRevisionList\doPreCommitUpdates(), RevDelList\doPreCommitUpdates(), FileBackendStore\doPrepare(), FSFileBackend\doPrepareInternal(), FileBackendStore\doPrepareInternal(), SwiftFileBackend\doPrepareInternal(), FileBackendStore\doPublish(), FSFileBackend\doPublishInternal(), FileBackendStore\doPublishInternal(), SwiftFileBackend\doPublishInternal(), DBFileJournal\doPurgeOldLogs(), NullFileJournal\doPurgeOldLogs(), FileBackend\doQuickOperations(), FileBackendMultiWrite\doQuickOperationsInternal(), FileBackendStore\doQuickOperationsInternal(), FileBackendStore\doSecure(), FSFileBackend\doSecureInternal(), FileBackendStore\doSecureInternal(), SwiftFileBackend\doSecureInternal(), FSLockManager\doSingleLock(), FSLockManager\doSingleUnlock(), MemoryFileBackend\doStoreInternal(), FSFileBackend\doStoreInternal(), SwiftFileBackend\doStoreInternal(), FileBackendStore\doStreamFile(), SwiftFileBackend\doStreamFile(), FileBackendTest\doTestLockCalls(), FSLockManager\doUnlock(), NullLockManager\doUnlock(), QuorumLockManager\doUnlockByType(), LockManager\doUnlockByType(), QuorumLockManager\doUnlockingRequestBucket(), WatchAction\doUnwatch(), WikiPage\doUpdateRestrictions(), WatchAction\doWatch(), WatchAction\doWatchOrUnwatch(), ZipDirectoryReader\execute(), UploadBase\fetchFile(), UserrightsPage\fetchUser(), MemcLockManager\freeLocksOnServer(), DBLockManager\freeLocksOnServer(), RedisLockManager\freeLocksOnServer(), ApiUpload\getChunkResult(), PoolCounterRedis\getConnection(), DatabaseInstaller\getConnection(), RedisLockManager\getLocksOnServer(), MemcLockManager\getLocksOnServer(), DBLockManager\getLocksOnServer(), PostgresInstaller\getPgConnection(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\getProvider(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\getProvider(), SpecialUnlinkAccounts\handleFormSubmit(), SpecialChangeCredentials\handleFormSubmit(), AuthManagerSpecialPage\handleFormSubmit(), WebInstallerExistingWiki\importVariables(), Installer\includeExtensions(), LoginFormPreAuthManager\initUser(), EditPage\internalAttemptSave(), RevDelItem\lock(), FileJournal\logChangeBatch(), BotPassword\login(), SqliteInstaller\makeStubDBFile(), MovePage\move(), ImportStreamSource\newFromFile(), ImportStreamSource\newFromURL(), FileRepo\newGood(), FileBackendStore\nullInternal(), SwiftFileBackend\objectListing(), SpecialUnlockdb\onSubmit(), SpecialLockdb\onSubmit(), SpecialBotPasswords\onSubmit(), SpecialExpandTemplates\onSubmitInput(), MysqlInstaller\openConnection(), OracleInstaller\openConnection(), SqliteInstaller\openConnection(), MssqlInstaller\openConnection(), PostgresInstaller\openConnectionToAnyDB(), PostgresInstaller\openConnectionWithParams(), OracleInstaller\openSYSDBAConnection(), FormatJson\parse(), ApiUpload\performUpload(), DatabaseInstaller\populateInterwikiTable(), Installer\populateSiteStats(), PoolCounter\precheckAcquire(), FileOp\precheckDestExistence(), AbstractContent\prepareSave(), MediaWiki\Auth\AuthManagerTest\provideAllowsAuthenticationDataChange(), MWRestrictionsTest\provideCheck(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), FSLockManager\pruneKeyLockFiles(), PoolCounterRedis\release(), PoolCounter_Stub\release(), RedisLockManager\releaseAllLocks(), MemcLockManager\releaseAllLocks(), MySqlLockManager\releaseAllLocks(), PostgreSqlLockManager\releaseAllLocks(), RevDelList\releaseItemLocks(), LocalFileDeleteBatch\removeNonexistentFiles(), LocalFileRestoreBatch\removeNonexistentFiles(), LocalFileMoveBatch\removeNonexistentFiles(), FileBackendMultiWrite\resyncFiles(), AssembleUploadChunksJob\run(), PublishStashedFileJob\run(), SpecialBotPasswords\save(), UserMailer\send(), UserMailer\sendInternal(), UserMailer\sendWithPear(), SwiftFileBackend\setContainerAccess(), User\setEmailWithConfirmation(), WikiImporter\setTargetRootPage(), SqliteInstaller\setupDatabase(), OracleInstaller\setupDatabase(), PostgresInstaller\setupDatabase(), PostgresInstaller\setupPLpgSQL(), PostgresInstaller\setupSchema(), OracleInstaller\setupUser(), MysqlInstaller\setupUser(), MssqlInstaller\setupUser(), PostgresInstaller\setupUser(), RevDelList\setVisibility(), LocalRepo\skipWriteOperationIfSha1(), FileBackendStore\streamFile(), MediaTransformOutput\streamFileWithStatus(), PostgresInstaller\submitConnectForm(), OracleInstaller\submitConnectForm(), MysqlInstaller\submitConnectForm(), MssqlInstaller\submitConnectForm(), OracleInstaller\submitInstallUserBox(), DatabaseInstaller\submitInstallUserBox(), EmailConfirmation\submitSend(), DatabaseInstaller\submitSettingsForm(), PostgresInstaller\submitSettingsForm(), MssqlInstaller\submitSettingsForm(), MysqlInstaller\submitSettingsForm(), DatabaseInstaller\submitWebUserBox(), SyncFileBackend\syncFileBatch(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoAccountCreation(), MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProviderTest\testBeginSecondaryAccountCreation(), MediaWiki\Auth\AuthManagerTest\testCanCreateAccount(), MediaWiki\Auth\AuthManagerTest\testCheckAccountCreatePermissions(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testCheckPasswordValidity(), ApiResultTest\testDeprecatedFunctions(), ApiErrorFormatterTest\testErrorFormatter(), ApiErrorFormatterTest\testErrorFormatterBC(), PasswordResetTest\testExecute_email(), PasswordResetTest\testIsAllowed(), StatusTest\testNewGood(), StatusTest\testOkAndErrors(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testSetPasswordResetFlag(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testSetPasswordResetFlag(), SpecialUploadStash\tryClearStashedUploads(), AuthManagerSpecialPage\trySubmit(), Preferences\tryUISubmit(), PageArchive\undeleteRevisions(), RevDelItem\unlock(), ChangeTags\updateTagsWithChecks(), SpecialBlock\validateTarget(), MediaHandler\verifyUpload(), and PoolCounterRedis\waitForSlotOrNotif().
Status::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.
Note, due to the lack of tools for comparing Message objects, this function will not work when using a Message object as the search parameter.
Message | string | $source | Message key or object to search for |
Message | string | $dest | Replacement message key or object |
Definition at line 471 of file Status.php.
References $source.
Status::setResult | ( | $ok, | |
$value = null |
|||
) |
Change operation result.
bool | $ok | Whether the operation completed |
mixed | $value |
Definition at line 114 of file Status.php.
References $value.
Status::warning | ( | $message | ) |
Add a new warning.
Definition at line 151 of file Status.php.
Referenced by Installer\subscribeToMediaWikiAnnounce().
|
static |
Succinct helper method to wrap a StatusValue.
This is is useful when formatting StatusValue objects:
StatusValue | Status | $sv |
Definition at line 79 of file Status.php.
References $sv.
Referenced by MediaWiki\Auth\AuthManager\allowsAuthenticationDataChange(), MediaWiki\Auth\AuthManager\autoCreateUser(), MediaWiki\Auth\AuthManager\beginAccountCreation(), MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\beginAuthentication(), MediaWiki\Auth\AuthManager\canCreateAccount(), SpecialPasswordReset\checkExecutePermissions(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAuthentication(), AuthManagerSpecialPage\displayForm(), ApiResetPassword\execute(), SpecialPasswordReset\onSubmit(), MediaWiki\Auth\AuthManagerTest\provideAllowsAuthenticationDataChange(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\provideProviderAllowsAuthenticationDataChange(), LoginSignupSpecialPage\showSuccessPage(), and AuthManagerSpecialPage\trySubmit().
callable Status::$cleanCallback = false |
Definition at line 54 of file Status.php.
int Status::$failCount = 0 |
Counter for batch operations.
Definition at line 51 of file Status.php.
array Status::$success = [] |
Map of (key => bool) to indicate success of each part of batch operations.
Definition at line 47 of file Status.php.
int Status::$successCount = 0 |
Counter for batch operations.
Definition at line 49 of file Status.php.
|
protected |
Definition at line 42 of file Status.php.
Referenced by __construct(), getStatusValue(), newGood(), and wrap().
mixed Status::$value |
Definition at line 45 of file Status.php.
Referenced by __set(), newGood(), and setResult().