Library
Class

Library\Event\AbstractObservable

abstract class AbstractObservable implements ObservableInterface

Class AbstractObservable

Methods

__construct()

Initialize the observers storage registry

$this attachObserver(ObserverInterface|array|callable $observer)

$this detachObserver(ObserverInterface|array|callable $observer)

$this triggerEvent(string|null $event_name = null)

Details

at line 43
public __construct()

Initialize the observers storage registry

at line 52
public $this attachObserver(ObserverInterface|array|callable $observer)

Parameters

ObserverInterface|array|callable $observer | array($object , $method) | $callback

Return Value

$this

at line 62
public $this detachObserver(ObserverInterface|array|callable $observer)

Parameters

ObserverInterface|array|callable $observer | array($object , $method) | $callback

Return Value

$this

at line 72
public $this triggerEvent(string|null $event_name = null)

Parameters

string|null $event_name

Return Value

$this