|
MediaWiki
1.23.0
|
Class for asserting that a callback happens when an dummy object leaves scope. More...
Public Member Functions | |
| __construct ( $callback) | |
| __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 |
Class for asserting that a callback happens when an dummy object leaves scope.
Definition at line 28 of file ScopedCallback.php.
| ScopedCallback::__construct | ( | $callback | ) |
| callable | $callback |
| Exception |
Definition at line 35 of file ScopedCallback.php.
References $callback.
| ScopedCallback::__destruct | ( | ) |
Trigger the callback when this leaves scope.
Definition at line 67 of file ScopedCallback.php.
|
static |
Destroy a scoped callback without triggering it.
| ScopedCallback | $sc |
Definition at line 57 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 48 of file ScopedCallback.php.
Referenced by MessageCache\load().
|
protected |