getRouter(); // TODO: Implement setHandler() method. $node = $router->addRoute($this->uri, $handler, $this->method); foreach ($attributes as $name => $attribute) { $first = 'add' . ucfirst($attribute); $_handler = is_array($handler) ? $handler[0] : $handler; if (!method_exists($_handler, $first)) { continue; } $node->$first($attribute); } return $node; } }