diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-02-25 16:58:23 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-02-25 16:58:23 +0000 |
| commit | 208909d87c604632b8d559fb0d499ab0b3b06331 (patch) | |
| tree | 6909128a38d49f5c9d2955629340e20e198015cb /app/Contracts/RouteFactoryInterface.php | |
| parent | 49d69bf93a88a348e39b02a016d75cd9c8765750 (diff) | |
| download | webtrees-208909d87c604632b8d559fb0d499ab0b3b06331.tar.gz webtrees-208909d87c604632b8d559fb0d499ab0b3b06331.tar.bz2 webtrees-208909d87c604632b8d559fb0d499ab0b3b06331.zip | |
User factories to create routes and responses
Diffstat (limited to 'app/Contracts/RouteFactoryInterface.php')
| -rw-r--r-- | app/Contracts/RouteFactoryInterface.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app/Contracts/RouteFactoryInterface.php b/app/Contracts/RouteFactoryInterface.php new file mode 100644 index 0000000000..c066c61d3f --- /dev/null +++ b/app/Contracts/RouteFactoryInterface.php @@ -0,0 +1,36 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2022 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Contracts; + +/** + * Make a URL for a route. + */ +interface RouteFactoryInterface +{ + /** + * Generate a URL for a named route. + * + * @param string $route_name + * @param array<bool|int|string|array<string>|null> $parameters + * + * @return string + */ + public function route(string $route_name, array $parameters = []): string; +} |
