Conditions | 4 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
22 | private function getFilename(RequestInterface $request) |
||
23 | { |
||
24 | $path = $this->getBasePath($request->getUri()->getPath()); |
||
25 | |||
26 | $parts = pathinfo($path); |
||
27 | $path = isset($parts['dirname']) ? $parts['dirname'] : ''; |
||
28 | $filename = isset($parts['basename']) ? $parts['basename'] : ''; |
||
29 | |||
30 | //if it's a directory, append "/index.html" |
||
31 | if (empty($parts['extension'])) { |
||
32 | $filename .= '/index.html'; |
||
33 | } |
||
34 | |||
35 | return Path::join($this->storage, $path, $filename); |
||
36 | } |
||
37 | } |
||
38 |