Esempio n. 1
0
 /**
  * 魔术调用.
  *
  * @param string $method
  * @param array  $args
  *
  * @return mixed
  */
 public function __call($method, $args)
 {
     if (in_array($method, $this->events, true)) {
         $callback = array_shift($args);
         is_callable($callback) && $this->listeners->set($method, $callback);
         return;
     }
 }