|
@@ 45-56 (lines=12) @@
|
| 42 |
|
|
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function subscribe($event, $class, $method = null, $priority = 0) { |
| 46 |
|
|
| 47 |
|
$callable = ( is_null($method) ) ? $class : array($class, $method); |
| 48 |
|
|
| 49 |
|
$this->logger->debug("Subscribing handler $calss to event $event", array( |
| 50 |
|
"CALLABLE" => $callable, |
| 51 |
|
"PRIORITY" => $priority |
| 52 |
|
)); |
| 53 |
|
|
| 54 |
|
return $this->addListener($event, $callable, $priority); |
| 55 |
|
|
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function subscribeOnce($event, $class, $method = null, $priority = 0) { |
| 59 |
|
|
|
@@ 58-69 (lines=12) @@
|
| 55 |
|
|
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function subscribeOnce($event, $class, $method = null, $priority = 0) { |
| 59 |
|
|
| 60 |
|
$callable = ( is_null($method) ) ? $class : array($class, $method); |
| 61 |
|
|
| 62 |
|
$this->logger->debug("Subscribing once handler $calss to event $event", array( |
| 63 |
|
"CALLABLE" => $callable, |
| 64 |
|
"PRIORITY" => $priority |
| 65 |
|
)); |
| 66 |
|
|
| 67 |
|
return $this->addOneTimeListener($event, $callable, $priority); |
| 68 |
|
|
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function unsubscribe($event, $class = null, $method = null) { |
| 72 |
|
|