프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$events | Storage of events |
메소드 | 설명 | |
---|---|---|
addEvent ( string $id, PubSubEvent $obj ) : void | Adds event | |
eventExists ( string $id ) : boolean | Is event exists? | |
pub ( string $id, mixed $data ) : boolean | Publish | |
removeEvent ( string $id ) : void | Removes event | |
sub ( string $id, object $obj, callable $cb ) : boolean | Subcribe to event | |
unsub ( string $id, object $obj ) : boolean | Unsubscribe object from event | |
unsubFromAll ( object $obj ) : boolean | Unsubscribe object from all events |
public eventExists ( string $id ) : boolean | ||
$id | string | Event ID |
리턴 | boolean |
public removeEvent ( string $id ) : void | ||
$id | string | Event ID |
리턴 | void |
public unsubFromAll ( object $obj ) : boolean | ||
$obj | object | Subscriber |
리턴 | boolean | Success |