From c59c2d9f2ad8a6e9f3cdc2f32ed40a318ddd1dd5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 17 Mar 2019 16:42:06 +0100 Subject: [PATCH] Fix app name recognition bug --- Uri/Http.php | 2 +- Uri/UriInterface.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Uri/Http.php b/Uri/Http.php index fd060e5ef..0b316e396 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -248,7 +248,7 @@ final class Http implements UriInterface /** * {@inheritdoc} */ - public function setPathOffset(int $offset) : void + public function setPathOffset(int $offset = 0) : void { $this->pathOffset = $offset; } diff --git a/Uri/UriInterface.php b/Uri/UriInterface.php index 6913e614b..8ec17ba86 100644 --- a/Uri/UriInterface.php +++ b/Uri/UriInterface.php @@ -128,6 +128,19 @@ interface UriInterface */ public function setRootPath(string $root) : void; + /** + * Set path offset. + * + * This can be used if the uri path starts with elements which are not relevant later on. + * + * @param int $offset Path offset + * + * @return void + * + * @since 1.0.0 + */ + public function setPathOffset(int $offset = 0) : void; + /** * Get path element. *