1 | <?php |
||
11 | class Link implements LinkInterface, EvolvableLinkInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $rel; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $href; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $attributes; |
||
27 | |||
28 | /** |
||
29 | * @param string $rel |
||
30 | * @param string $href |
||
31 | * @param array $attributes |
||
32 | */ |
||
33 | public function __construct($rel, $href, array $attributes = array()) |
||
39 | |||
40 | /** |
||
41 | * @return array |
||
42 | */ |
||
43 | public function getAttributes() |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getHref() |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getRel() |
||
63 | |||
64 | /** |
||
65 | * {@inheritDoc} |
||
66 | */ |
||
67 | public function isTemplated() |
||
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | public function getRels() |
||
81 | |||
82 | /** |
||
83 | * {@inheritDoc} |
||
84 | */ |
||
85 | public function withHref($href) |
||
89 | |||
90 | /** |
||
91 | * {@inheritDoc} |
||
92 | */ |
||
93 | public function withRel($rel) |
||
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | public function withoutRel($rel) |
||
106 | |||
107 | /** |
||
108 | * {@inheritDoc} |
||
109 | */ |
||
110 | public function withAttribute($attribute, $value) |
||
119 | |||
120 | /** |
||
121 | * {@inheritDoc} |
||
122 | */ |
||
123 | public function withoutAttribute($attribute) |
||
134 | } |
||
135 |