1 | <?php |
||
9 | class Psr7UriExtension extends Twig_Extension |
||
10 | { |
||
11 | use ServerRequestTrait; |
||
12 | |||
13 | /** |
||
14 | * @return string The extension name |
||
15 | 1 | */ |
|
16 | public function getName() |
||
20 | 1 | ||
21 | public function getFunctions() |
||
28 | |||
29 | /** |
||
30 | * @param string $path |
||
31 | * |
||
32 | * @return string |
||
33 | 10 | */ |
|
34 | public function generateAbsoluteUrl($path = null) |
||
53 | |||
54 | 8 | /** |
|
55 | * @param UriInterface $uri |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | protected function urlFromUri(UriInterface $uri) |
||
77 | |||
78 | 12 | /** |
|
79 | 12 | * @param string $path |
|
80 | 12 | * |
|
81 | 12 | * @return string |
|
82 | 7 | */ |
|
83 | public function generateRelativePath($path) |
||
119 | |||
120 | /** |
||
121 | * @param string $path |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | protected function isNetworkPath($path) |
||
130 | |||
131 | /** |
||
132 | * @param string $path |
||
133 | * |
||
134 | * @return bool |
||
135 | */ |
||
136 | protected function hasLeadingSlash($path) |
||
140 | } |
||
141 |