BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ScopedCallback Class Reference
Inheritance diagram for ScopedCallback:

Public Member Functions

 __construct ($callback, array $params=[])
 
 __destruct ()
 

Static Public Member Functions

static consume (ScopedCallback &$sc=null)
 
static cancel (ScopedCallback &$sc=null)
 

Protected Attributes

 $callback
 
 $params
 

Detailed Description

Class for asserting that a callback happens when an dummy object leaves scope

Since
1.21

Constructor & Destructor Documentation

ScopedCallback::__construct (   $callback,
array  $params = [] 
)
Parameters
callable | null$callback
array$paramsCallback arguments (since 1.25)
Exceptions
Exception
ScopedCallback::__destruct ( )

Trigger the callback when this leaves scope

Member Function Documentation

static ScopedCallback::cancel ( ScopedCallback $sc = null)
static

Destroy a scoped callback without triggering it

Parameters
ScopedCallback$sc
static ScopedCallback::consume ( ScopedCallback $sc = null)
static

Trigger a scoped callback and destroy it. This is the same is just setting it to null.

Parameters
ScopedCallback$sc

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