Class \Prado\TEventSubscription
TEventSubscription class.
This class subscribes an event handler to an event for a limited period of time.
{
$exitLoop = false;
$subscription = new TEventSubscription($dispatcher, 'fxSignalInterrupt',
function ($sender, $param) use (&$exitLoop){
$exitLoop = true;
$param->setExit(false);
});
...
} // dereference unsubscribes
Class hierarchy
- \Prado\TEventSubscription
- \Prado\Collections\TCollectionSubscription
- \Prado\Collections\TArraySubscription uses TPriorityPropertyTrait
Since: 4.3.0
public
|
__construct([TComponent $component = null ][, mixed $event = null ][, mixed $handler = null ][, null|float|int $priority = null ][, bool|null $autoSubscribe = null ][, mixed $index = null ]) : mixed
Constructor.
|
public
|
getArray([bool $weak = false ]) : null|array<string|int, mixed>|ArrayAccess|WeakReference
Gets the component event handler.
|
public
|
|
public
|
|
public
|
setArray(null|array<string|int, mixed>|ArrayAccess &$value) : static
The Array for a TEventSubscription cannot be set
|
public
|
|
public
|