| @@ 118-124 (lines=7) @@ | ||
| 115 | string $path = null, |
|
| 116 | ContainerInterface $di = null |
|
| 117 | ) { |
|
| 118 | if ($this->mount) { |
|
| 119 | // Remove the mount path to get base for controller |
|
| 120 | $len = strlen($this->mount); |
|
| 121 | if (substr($path, 0, $len) == $this->mount) { |
|
| 122 | $path = ltrim(substr($path, $len), "/"); |
|
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | try { |
|
| 127 | $handler = new RouteHandler(); |
|
| @@ 154-159 (lines=6) @@ | ||
| 151 | public function getMatchedPath() |
|
| 152 | { |
|
| 153 | $path = $this->pathMatched; |
|
| 154 | if ($this->mount) { |
|
| 155 | $len = strlen($this->mount); |
|
| 156 | if (substr($path, 0, $len) == $this->mount) { |
|
| 157 | $path = ltrim(substr($path, $len), "/"); |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||
| 161 | return $path; |
|
| 162 | } |
|