17 lines
461 B
PHP
17 lines
461 B
PHP
<?php
|
|
// RouteHandlerTrait.php
|
|
// Created: 2024-03-28
|
|
// Updated: 2024-03-28
|
|
|
|
namespace Index\Http\Routing;
|
|
|
|
/**
|
|
* Provides an implementation of IRouteHandler::registerRoutes that uses the attributes.
|
|
* For more advanced use, everything can be use'd separately and HandlerAttribute::register called manually.
|
|
*/
|
|
trait RouteHandlerTrait {
|
|
public function registerRoutes(IRouter $router): void {
|
|
HandlerAttribute::register($router, $this);
|
|
}
|
|
}
|