public function registerInRouter(Router $router)
    {
        $routes = $this->routes();
        $group = $this->group();
        if (empty($routes)) {
            return;
        }
        foreach ($routes as $row) {
            $method = $row['method'];
            $route = $group . $row['route'];
            $handlerName = $row['handler'];
            $router->addRoute($method, $route, [$this, $handlerName]);
        }
    }
public function registerInRouter(Router $router)
    {
        $routes = $this->routes();
        $group = $this->group();
        if (empty($routes)) {
            return;
        }
        foreach ($routes as $row) {
            $method = $row['method'];
            $route = $group . $row['route'];
            $handlerName = $row['handler'];
            $router->addRoute($method, $route, [$this, $handlerName]);
        }
    }
public function registerInRouter ( Router $ router ) { $ routes = $ this -> routes ( ) ; $ group = $ this -> group ( ) ; if ( empty ( $ routes ) ) { return ; } foreach ( $ routes as $ row ) { $ method = $ row [ 'method' ] ; $ route = $ group . $ row [ 'route' ] ; $ handlerName = $ row [ 'handler' ] ; $ router -> addRoute ( $ method , $ route , [ $ this , $ handlerName ] ) ; } }
Register controller actions in router
@param Router $router
Register controller actions in router