Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class RequestAwareProvider extends DelegatingProvider |
||
16 | { |
||
17 | /** |
||
18 | * Constructor |
||
19 | * |
||
20 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
21 | 1 | */ |
|
22 | public function __construct(Request $request) |
||
23 | 1 | { |
|
24 | parent::__construct(); |
||
25 | 1 | ||
26 | 1 | $this->baseUrl = $request->getBaseUrl(); |
|
|
|||
27 | 1 | $this->prefix = $request->getSchemeAndHttpHost() . $this->baseUrl; |
|
28 | 1 | $this->baseUrlLen = strlen($this->baseUrl); |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @{inheritDoc} |
||
33 | 1 | */ |
|
34 | public function url($object, array $options = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) |
||
46 | } |
||
47 | } |
||
48 |