1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Routing;
12:
13: /**
14: * Interface for routers that the framework can utilize.
15: */
16: interface RoutePathGeneratorInterface
17: {
18: /**
19: * Set whether the regex pattern of route parameters should be validated on
20: * runtime.
21: *
22: * @param bool $validateParams
23: */
24: public function setValidateParams($validateParams);
25:
26: /**
27: * Generate the path (relative URL) for a route.
28: *
29: * @param Route $route
30: * @param array $params
31: *
32: * @return string
33: * @throws \InvalidArgumentException
34: */
35: public function getRoutePath(Route $route, array $params);
36: }
37: