xref: /webtrees/app/Contracts/RouteFactoryInterface.php (revision 158900c2b212361851fcf0964e99084458ce1b3a)
1208909d8SGreg Roach<?php
2208909d8SGreg Roach
3208909d8SGreg Roach/**
4208909d8SGreg Roach * webtrees: online genealogy
5208909d8SGreg Roach * Copyright (C) 2022 webtrees development team
6208909d8SGreg Roach * This program is free software: you can redistribute it and/or modify
7208909d8SGreg Roach * it under the terms of the GNU General Public License as published by
8208909d8SGreg Roach * the Free Software Foundation, either version 3 of the License, or
9208909d8SGreg Roach * (at your option) any later version.
10208909d8SGreg Roach * This program is distributed in the hope that it will be useful,
11208909d8SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12208909d8SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13208909d8SGreg Roach * GNU General Public License for more details.
14208909d8SGreg Roach * You should have received a copy of the GNU General Public License
15208909d8SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
16208909d8SGreg Roach */
17208909d8SGreg Roach
18208909d8SGreg Roachdeclare(strict_types=1);
19208909d8SGreg Roach
20208909d8SGreg Roachnamespace Fisharebest\Webtrees\Contracts;
21208909d8SGreg Roach
22*158900c2SGreg Roachuse Aura\Router\Map;
23*158900c2SGreg Roachuse Aura\Router\Route;
24*158900c2SGreg Roach
25208909d8SGreg Roach/**
26208909d8SGreg Roach * Make a URL for a route.
27208909d8SGreg Roach */
28208909d8SGreg Roachinterface RouteFactoryInterface
29208909d8SGreg Roach{
30208909d8SGreg Roach    /**
31208909d8SGreg Roach     * Generate a URL for a named route.
32208909d8SGreg Roach     *
33208909d8SGreg Roach     * @param string                                    $route_name
34208909d8SGreg Roach     * @param array<bool|int|string|array<string>|null> $parameters
35208909d8SGreg Roach     *
36208909d8SGreg Roach     * @return string
37208909d8SGreg Roach     */
38208909d8SGreg Roach    public function route(string $route_name, array $parameters = []): string;
39*158900c2SGreg Roach
40*158900c2SGreg Roach    /**
41*158900c2SGreg Roach     * @return Map<Route>
42*158900c2SGreg Roach     */
43*158900c2SGreg Roach    public function routeMap(): Map;
44208909d8SGreg Roach}
45