Свойство | Тип | Описание | |
---|---|---|---|
$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 |