Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Static Public Member Functions
CallbackPool Class Reference

Static Public Member Functions

static attach ($hashKey, $callback)
 
static clear ($hashKey)
 
static get ($hashKey)
 

Detailed Description

Class CallbackPool

Definition at line 12 of file CallbackPool.php.

Member Function Documentation

◆ attach()

static attach (   $hashKey,
  $callback 
)
static
Parameters
string$hashKey
array$callback
Returns
void

Definition at line 26 of file CallbackPool.php.

27  {
28  self::$commitCallbacks[$hashKey][] = $callback;
29  }

◆ clear()

static clear (   $hashKey)
static
Parameters
string$hashKey
Returns
void

Definition at line 35 of file CallbackPool.php.

36  {
37  self::$commitCallbacks[$hashKey] = [];
38  }

◆ get()

static get (   $hashKey)
static
Parameters
string$hashKey
Returns
array

Definition at line 44 of file CallbackPool.php.

45  {
46  if (!isset(self::$commitCallbacks[$hashKey])) {
47  return [];
48  }
49  $callbacks = self::$commitCallbacks[$hashKey];
50  self::$commitCallbacks[$hashKey] = [];
51  return $callbacks;
52  }

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