index/src/Routing/RouteHandlerTrait.php

17 lines
450 B
PHP

<?php
// RouteHandlerTrait.php
// Created: 2023-09-07
// Updated: 2023-09-07
namespace Index\Routing;
/**
* Provides an implementation of IRouteHandler::registerRoutes that uses the attributes.
* For more advanced use, everything can be use'd separately and Route::handleAttributes called manually.
*/
trait RouteHandlerTrait {
public function registerRoutes(IRouter $router): void {
Route::handleAttributes($router, $this);
}
}