| 1 | <?php |
||
| 8 | trait BasePathTrait |
||
| 9 | { |
||
| 10 | private $basePath = ''; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Set the basepath used in the request. |
||
| 14 | * |
||
| 15 | * @param string $basePath |
||
| 16 | * |
||
| 17 | * @return self |
||
| 18 | */ |
||
| 19 | public function basePath($basePath) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Removes the basepath from a path. |
||
| 28 | * |
||
| 29 | * @param string $path |
||
| 30 | * |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | private function getBasePath($path) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Tests the basepath and returns whether the path matches. |
||
| 44 | * |
||
| 45 | * @param string $path |
||
| 46 | * |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | private function testBasePath($path) |
||
| 57 | } |
||
| 58 |