-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUrlGeneratorInterface.php
More file actions
77 lines (71 loc) · 2.11 KB
/
UrlGeneratorInterface.php
File metadata and controls
77 lines (71 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* File defining Backend\Interfaces\UrlGeneratorInterface.
*
* PHP Version 5.3
*
* @category Backend
* @package Interfaces
* @author J Jurgens du Toit <jrgns@backend-php.net>
* @copyright 2011 - 2012 Jade IT (cc)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @link http://backend-php.net
*/
namespace Backend\Interfaces;
/**
* Class to generate URL's using routing information.
*
* @category Backend
* @package Interfaces
* @author J Jurgens du Toit <jrgns@backend-php.net>
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @link http://backend-php.net
*/
interface UrlGeneratorInterface
{
/**
* The class constructor.
*
* @param \Backend\Interfaces\RequestContextInterface $context The context of
* the current request.
* @param \Backend\Interfaces\ConfigInterface $config A config object
* containing route definitions.
*/
public function __construct(RequestContextInterface $context, ConfigInterface $config);
/**
* Generate a link for the given Route.
*
* @param string $routeName The name of the route to generate a link for.
*
* @return string
*/
public function generate($routeName);
/**
* Set the context.
*
* @param \Backend\Interfaces\RequestContextInterface $context The context object to set.
*
* @return \Backend\Interfaces\URlGeneratorInterface The current object
*/
public function setContext(RequestContextInterface $context);
/**
* Get the context.
*
* @return \Backend\Interfaces\RequestContextInterface The context object.
*/
public function getContext();
/**
* Set the Config.
*
* @param \Backend\Interfaces\ConfigInterface $config The config object to set.
*
* @return \Backend\Interfaces\URlGeneratorInterface The current object
*/
public function setConfig(ConfigInterface $config);
/**
* Get the Config.
*
* @return \Backend\Interfaces\ConfigInterface $config The config object.
*/
public function getConfig();
}