1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: */
11:
12: namespace Nette\Application;
13:
14: use Nette;
15:
16:
17:
18: /**
19: * The bi-directional router.
20: *
21: * @author David Grudl
22: */
23: interface IRouter
24: {
25: /**#@+ flag */
26: const ONE_WAY = 1;
27: const SECURED = 2;
28: /**#@-*/
29:
30: /**
31: * Maps HTTP request to a PresenterRequest object.
32: * @param Nette\Web\IHttpRequest
33: * @return PresenterRequest|NULL
34: */
35: function match(Nette\Web\IHttpRequest $httpRequest);
36:
37: /**
38: * Constructs absolute URL from PresenterRequest object.
39: * @param Nette\Web\IHttpRequest
40: * @param PresenterRequest
41: * @return string|NULL
42: */
43: function constructUrl(PresenterRequest $appRequest, Nette\Web\IHttpRequest $httpRequest);
44:
45: }
46: