diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 97854c5..1da4204 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,9 @@ - + + + - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + @@ -53,7 +69,7 @@ - + @@ -62,7 +78,7 @@ - + @@ -71,17 +87,17 @@ - + - + - - + + @@ -99,7 +115,6 @@ - renderRoute findRoute ->fireEvents RENDER_MIDD @@ -115,7 +130,6 @@ $this->result $this->r getInput - helpers.php input()->get getObject helpers @@ -129,19 +143,21 @@ getError (int) setSize + helpers.php + getName D:\Workspace\simple-php-router\src\Pecee\SimpleRouter\Route D:\Workspace\simple-php-router\src D:\Workspace\simple-php-router\tests\Pecee\SimpleRouter\Dummy D:\Workspace\simple-php-router - E:\Workspace\simple-php-router\src\Pecee\SimpleRouter\Route E:\Workspace\simple-php-router\tests E:\Workspace\simple-php-router\src\Pecee E:\Workspace\simple-php-router E:\Workspace\simple-php-router\src\Pecee\SimpleRouter E:\Workspace\simple-php-router\tests\Pecee\SimpleRouter E:\Workspace\simple-php-router\src + E:\Workspace\simple-php-router\src\Pecee\SimpleRouter\Route @@ -184,15 +200,11 @@ @@ -261,8 +277,8 @@ - @@ -330,6 +346,14 @@ + + + + + + + + @@ -487,7 +511,8 @@ - + + @@ -524,7 +549,7 @@ - @@ -544,11 +569,11 @@ - - + + - + @@ -574,6 +599,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -621,13 +684,6 @@ - - - - - - - @@ -729,13 +785,6 @@ - - - - - - - @@ -751,13 +800,6 @@ - - - - - - - @@ -814,16 +856,6 @@ - - - - - - - - - - @@ -835,13 +867,6 @@ - - - - - - - @@ -854,7 +879,7 @@ - + @@ -868,22 +893,60 @@ - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 0592ed9..16aa41c 100644 --- a/README.md +++ b/README.md @@ -332,7 +332,7 @@ function request(): Request * @param string|null $index Parameter index name * @param string|null $defaultValue Default return value * @param array ...$methods Default methods - * @return \Pecee\Http\Input\InputHandler|\Pecee\Http\Input\IInputItem|string + * @return \Pecee\Http\Input\InputHandler|string */ function input($index = null, $defaultValue = null, ...$methods) { diff --git a/helpers.php b/helpers.php index 264df05..00ffa4b 100644 --- a/helpers.php +++ b/helpers.php @@ -49,7 +49,7 @@ function request(): Request * @param string|null $index Parameter index name * @param string|null $defaultValue Default return value * @param array ...$methods Default methods - * @return \Pecee\Http\Input\InputHandler|\Pecee\Http\Input\IInputItem|string + * @return \Pecee\Http\Input\InputHandler|string */ function input($index = null, $defaultValue = null, ...$methods) { diff --git a/src/Pecee/SimpleRouter/Route/LoadableRoute.php b/src/Pecee/SimpleRouter/Route/LoadableRoute.php index 9fc4cb3..a719af7 100644 --- a/src/Pecee/SimpleRouter/Route/LoadableRoute.php +++ b/src/Pecee/SimpleRouter/Route/LoadableRoute.php @@ -154,7 +154,7 @@ abstract class LoadableRoute extends Route implements ILoadableRoute * * @return string */ - public function getName(): string + public function getName(): ?string { return $this->name; } diff --git a/src/Pecee/SimpleRouter/Route/Route.php b/src/Pecee/SimpleRouter/Route/Route.php index ad56adc..c71686c 100644 --- a/src/Pecee/SimpleRouter/Route/Route.php +++ b/src/Pecee/SimpleRouter/Route/Route.php @@ -192,7 +192,7 @@ abstract class Route implements IRoute return $this->callback; } - return 'function_' . md5($this->callback); + return 'function:' . md5($this->callback); } /**