diff --git a/Uri/Http.php b/Uri/Http.php index b6362eb4e..2530fb28a 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -262,6 +262,11 @@ class Http implements UriInterface { return $this->path; } + + public function getPathOffset() : int + { + return substr_count($this->rootPath, '/') - 1; + } /** * {@inheritdoc}