diff --git a/VERSION b/VERSION index df8466e..5a96943 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2308.220004 +0.2309.61148 diff --git a/src/Http/HttpFx.php b/src/Http/HttpFx.php index c6bf3da..ede90bd 100644 --- a/src/Http/HttpFx.php +++ b/src/Http/HttpFx.php @@ -1,7 +1,7 @@ router->add('options', $path, $handler); } + + /** + * Registers routes in an IRouteHandler implementation. + * + * @param IRouteHandler $handler Routes handler. + */ + public function register(IRouteHandler $handler): void { + $handler->registerRoutes($this->router); + } } diff --git a/src/Routing/IRouteHandler.php b/src/Routing/IRouteHandler.php new file mode 100644 index 0000000..3122c4d --- /dev/null +++ b/src/Routing/IRouteHandler.php @@ -0,0 +1,10 @@ +add('options', $path, $handler); } + + /** + * Registers routes in an IRouteHandler implementation. + * + * @param IRouteHandler $handler Routes handler. + */ + public function register(IRouteHandler $handler): void { + $handler->registerRoutes($this); + } }