PHP Class Swoole\Component\Observer

Inheritance: implements SplSubject
Show file Open project: matyhtf/swoole_framework

Protected Properties

Property Type Description
$_observers SplObjectStorage

Public Methods

Method Description
attach ( SplObserver $observer ) 添加观察者
detach ( SplObserver $observer ) 移除观察者
notify ( ) 通知所有观察者

Method Details

attach() public method

添加观察者
public attach ( SplObserver $observer )
$observer SplObserver

detach() public method

移除观察者
public detach ( SplObserver $observer )
$observer SplObserver

notify() public method

通知所有观察者
public notify ( )

Property Details

$_observers protected property

protected SplObjectStorage $_observers
return SplObjectStorage