MediaWiki
master
|
Class for asserting that a callback happens when an dummy object leaves scope. More...
Public Member Functions | |
__construct ($callback, array $params=[]) | |
__destruct () | |
Trigger the callback when this leaves scope. More... | |
Static Public Member Functions | |
static | cancel (ScopedCallback &$sc=null) |
Destroy a scoped callback without triggering it. More... | |
static | consume (ScopedCallback &$sc=null) |
Trigger a scoped callback and destroy it. More... | |
Protected Attributes | |
callable | $callback |
array | $params |
Class for asserting that a callback happens when an dummy object leaves scope.
Definition at line 28 of file ScopedCallback.php.
ScopedCallback::__construct | ( | $callback, | |
array | $params = [] |
||
) |
callable | null | $callback | |
array | $params | Callback arguments (since 1.25) |
Exception |
Definition at line 39 of file ScopedCallback.php.
ScopedCallback::__destruct | ( | ) |
Trigger the callback when this leaves scope.
Definition at line 72 of file ScopedCallback.php.
|
static |
Destroy a scoped callback without triggering it.
ScopedCallback | $sc |
Definition at line 62 of file ScopedCallback.php.
|
static |
Trigger a scoped callback and destroy it.
This is the same is just setting it to null.
ScopedCallback | $sc |
Definition at line 53 of file ScopedCallback.php.
Referenced by User\doLogout(), EditPage\doPreviewParse(), LinksDeletionUpdate\doUpdate(), LinksUpdate\doUpdate(), MediaWiki\Session\SessionManager\getSessionFromInfo(), DatabaseBase\query(), MessageCache\replace(), AssembleUploadChunksJob\run(), PublishStashedFileJob\run(), ResourceLoaderModule\saveFileDependencies(), User\setCookies(), MediaWiki\Auth\AuthManager\setSessionDataForUser(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreationEmail(), MediaWiki\Session\SessionManagerTest\testAutoCreateUser(), MediaWiki\Auth\AuthManagerTest\testBeginAuthentication(), MediaWiki\Auth\AuthManagerTest\testCanAuthenticateNow(), MediaWiki\Auth\AuthManagerTest\testCheckAccountCreatePermissions(), MediaWiki\Session\SessionBackendTest\testDelaySave(), WikiCategoryPageTest\testHiddenCategory_PropertyIsSet(), WikiCategoryPageTest\testHiddenCategory_PropertyNotSet(), RecentChangeTest\testHiddenCategoryChange(), BotPasswordTest\testLogin(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationData(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationDataEmail(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_futureNotificationTimestampForced(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_futureNotificationTimestampNotForced(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_item(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_noItemForced(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_notWatchedPageForced(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_oldidSpecifiedLatestRevisionForced(), WatchedItemStoreUnitTest\testResetNotificationTimestamp_oldidSpecifiedNotLatestRevisionForced(), MediaWiki\Auth\AuthManagerTest\testSecuritySensitiveOperationStatus(), and wfResetSessionID().
|
protected |
Definition at line 30 of file ScopedCallback.php.
Referenced by __construct().
|
protected |
Definition at line 32 of file ScopedCallback.php.
Referenced by __construct().