emit() public method

TODO: Is a pqueue required here for performance enhancement in case we have too many cbs on a specific event?
public emit ( string $ev, array $data = [] ) : array
$ev string
$data array
return array
Example #1
0
File: jaxl.php Project: jaxl/JAXL
 public function handle_other($event, $args)
 {
     $stanza = isset($args[0]) ? $args[0] : null;
     $stanza = new XMPPStanza($stanza);
     $ev = 'on_' . $stanza->name . '_stanza';
     if ($this->ev->exists($ev)) {
         return $this->ev->emit($ev, array($stanza));
     } else {
         JAXLLogger::warning("event '" . $event . "' catched in handle_other with stanza name " . $stanza->name);
     }
 }