getAttribute('route'); $callback = !empty($route->fn) ? $route->fn : null; if (!is_callable($callback)) { throw new \RuntimeException("'fn' property of route shoud be a callable"); } return $callback($request, $response); } }