Inheritance: extends CapMousse\ReactRestify\Evenement\EventEmitter
Example #1
0
 /**
  * Add a new group of routes
  * @param string   $prefix
  * @param Callable $callback
  *
  * return \CapMousse\ReactRestify\Routing\Group
  */
 public function group($prefix, $callback)
 {
     $group = $this->router->addGroup($this->prefix . '/' . $prefix, $callback);
     $group->onAny(function ($event, $arguments) {
         $this->emit($event, $arguments);
     });
 }