| @@ 65-75 (lines=11) @@ | ||
| 62 | * @param string $event |
|
| 63 | * @return bool true on success false on failure |
|
| 64 | */ |
|
| 65 | public function clearListeners($event) |
|
| 66 | { |
|
| 67 | if (is_string($event)) |
|
| 68 | { |
|
| 69 | $this->listenersHeap[$event] = null; |
|
| 70 | ||
| 71 | return true; |
|
| 72 | } |
|
| 73 | ||
| 74 | return false; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Trigger an event |
|
| @@ 123-132 (lines=10) @@ | ||
| 120 | * @param string $event |
|
| 121 | * @return bool true on success false on failure |
|
| 122 | */ |
|
| 123 | public function isExistListeners($event) |
|
| 124 | { |
|
| 125 | if (is_string($event)) { |
|
| 126 | if (is_null($this->listenersHeap[$event])) { |
|
| 127 | return false; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||
| 131 | return true; |
|
| 132 | } |
|
| 133 | } |
|
| 134 | ||