Compare commits
No commits in common. "master" and "20241005.3" have entirely different histories.
master
...
20241005.3
1 changed files with 2 additions and 4 deletions
|
@ -2,18 +2,16 @@
|
||||||
namespace Misuzu;
|
namespace Misuzu;
|
||||||
|
|
||||||
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
|
||||||
use Index\Urls\{UrlFormat,UrlRegistry,UrlSource};
|
use Index\Urls\{UrlFormat,UrlRegistry,UrlSource,UrlSourceTrait};
|
||||||
|
|
||||||
class LegacyRoutes implements RouteHandler, UrlSource {
|
class LegacyRoutes implements RouteHandler, UrlSource {
|
||||||
use RouteHandlerTrait;
|
use RouteHandlerTrait, UrlSourceTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private UrlRegistry $urls
|
private UrlRegistry $urls
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function registerUrls(UrlRegistry $urls): void {
|
public function registerUrls(UrlRegistry $urls): void {
|
||||||
UrlFormat::register($urls, $this);
|
|
||||||
|
|
||||||
// eventually this should be handled by context classes
|
// eventually this should be handled by context classes
|
||||||
$urls->register('search-index', '/search.php');
|
$urls->register('search-index', '/search.php');
|
||||||
$urls->register('search-query', '/search.php', ['q' => '<query>'], '<section>');
|
$urls->register('search-query', '/search.php', ['q' => '<query>'], '<section>');
|
||||||
|
|
Loading…
Reference in a new issue