Commit Graph

840 Commits

Author SHA1 Message Date
DeveloperMarius
cb2cb91a0a Add on pull request 2021-03-22 23:00:39 +01:00
DeveloperMarius
533dd08217 Github Actions CI on push 2021-03-22 22:58:53 +01:00
Simon Sessingø
6686de46b9 Updated link to simple-router demo. 2021-03-22 20:35:42 +01:00
Simon Sessingø
11fffd9a7b [FEATURE] Added option to get/set the filterEmptyParams option on IRoute classes (as requested by: #453). 2021-03-22 15:06:20 +01:00
Simon Sessingø
87e9c19edb Added unit-tests for input->all() method. 2021-03-22 14:49:33 +01:00
Simon Sessingø
8a0f30c05e Custom regex fix
- Fixed issue with custom-regex maching both host-name and url (issue: #503).
- Changed TestRouter so host-name is always set.
2021-03-22 14:09:27 +01:00
Simon Sessingø
d2b3ea4f54 Added better header parsing to Request-class.
- Added `tryParse` argument to the `getHeader` method. When enabled the method will try to parse headers from both server and client-side (enabled by default).
- Simplified references that checks for both variants of header (http/non http).
- Simplified getIp method of the Request-class.
2021-03-22 11:14:22 +01:00
Simon Sessingø
0aeefa1cba Removed ob_end_clean when using ob_get_clean. 2021-03-21 15:22:35 +01:00
Simon Sessingø
8254c5b100 Development
- Removed unused class references.
- Removed escape from `-` in reg-ex as it's only required when next to character-class.
- Added `$_FILE` support for `all` method.
- Bugfixes.
2021-03-21 15:19:27 +01:00
Simon Sessingø
4639879a67 Merge pull request #502 from skipperbent/DeveloperMarius-get-csrf-token
Developer marius get csrf token
2021-03-21 14:59:08 +01:00
Simon Sessingø
14fe889298 Merge branch 'v4-development' into DeveloperMarius-get-csrf-token 2021-03-21 14:58:20 +01:00
Simon Sessingø
dfcbbb4033 Merge pull request #501 from DeveloperMarius/get-csrf-token
get csrf token in request and test for prefix 'http-' in csrf token header
2021-03-21 14:57:10 +01:00
Simon Sessingø
e8a1eac167 Development
- Moved request-types constants from abstract Route class to global Request-class and changed references.
- Changed code to use new global request-type constants.
- Optimized InputHandler class so it only parses inputs once when calling all-method.
- Forced csrf-token post-value are now availible in all requestTypePost methods.
2021-03-21 14:52:34 +01:00
Simon Sessingø
2ff278baef Merge branch 'get-csrf-token' of https://github.com/DeveloperMarius/simple-php-router into DeveloperMarius-get-csrf-token 2021-03-21 14:16:20 +01:00
Simon Sessingø
388be3d870 Merge pull request #500 from DeveloperMarius/remove-idea-config
remove .idea files
2021-03-21 14:03:05 +01:00
Simon Sessingø
f45e0bd12a Removed .idea folder and removed "index" output from the unit-tests. 2021-03-21 13:59:35 +01:00
Marius Karstedt
31b4b4673e add csrf token check for patch 2021-03-21 12:20:57 +01:00
Marius Karstedt
05e5461acb get csrf token in request; Test for prefix 'http-' in csrf token header 2021-03-21 11:40:37 +01:00
Marius Karstedt
3970ad85c4 remove .idea files 2021-03-21 10:47:49 +01:00
Simon Sessingø
38ce2e6bba Unit test fixes 2021-03-21 08:02:41 +01:00
Simon Sessingø
2306ab47db Merge pull request #499 from skipperbent/fix-partial-group
[BUGFIX] Fixed issue with child groups not loading when using partialGroups (issue: #456)
2021-03-21 07:57:14 +01:00
Simon Sessingø
4674dbef1a Merge branch 'v4-development' into fix-partial-group 2021-03-21 07:57:01 +01:00
Simon Sessingø
f50ed6cd27 Merge pull request #498 from skipperbent/v4-array-callback
[FEATURE] Added support for class hinting on routes as requested by #491
2021-03-21 07:55:27 +01:00
Simon Sessingø
d70b153189 [BUGFIX] Fixed issue with child groups not loading when using partialGroups (issue: #456) 2021-03-21 07:39:17 +01:00
Simon Sessingø
21d180ebc9 [FEATURE] Added support for class hinting on routes as requested by #491 2021-03-21 05:55:18 +01:00
Simon Sessingø
e78040aabd Fixed existing unit-tests. 2021-03-18 21:58:40 +01:00
Simon Sessingø
252cc4a75d Optimized InputHandler to better support nested values. 2021-03-18 21:58:12 +01:00
Simon Sessingø
24ef438334 Merge pull request #495 from SimonSchobel/patch-1
Fixed bug in getIp
2021-03-18 14:03:39 +01:00
Simon Schøbel
6fc0241bab Fixed bug in getIp
Fixed typo
2021-03-18 08:12:48 +01:00
Simon Sessingø
19b1a14dec Parameters are by default now using regex [\w\-]+ (supports dashes) to avoid confusion. 2021-03-18 03:24:47 +01:00
Simon Sessingø
fb726c3613 Issue #437: Fixed CSRF-token returning null on first refresh after cookies are removed. 2021-03-18 02:50:06 +01:00
Simon Sessingø
11a69c2f72 Fixed user-tests after changes to input->all() method. 2021-03-17 20:26:07 +01:00
Simon Sessingø
ff8ef9d412 Merge branch 'v4-development' of github.com:skipperbent/simple-php-router into v4-development 2021-03-17 20:20:56 +01:00
Simon Sessingø
ca88e86c3d Development
- Removed unused exception from PHP-docs.
- Fixed types not same as declared.
- Fixed issues with reg-ex and php-unit tests.
- Removed unnecessary type casting.
- Declared functions as static (better scoping + performance).
- Moved `\is_callable($callback) === false` as the execution costs less than previous in `Router.php`.
- Changed `ob_get_contents` to `ob_get_clean`.
- Added type hints to methods.
2021-03-17 20:20:28 +01:00
Simon Sessingø
5a24dfd4a1 Merge pull request #461 from b3none/master
Alter behaviour of input()->all when a filter is passed.
2021-03-17 19:25:51 +01:00
Simon Sessingø
891c2092eb Changed codestyle to match the rest 2021-03-17 19:25:18 +01:00
Simon Sessingø
845ef9db69 Merge pull request #450 from RedooNetworks/master
Fix warning, because of wrong calculated cookie expiration timestamp
2021-03-17 19:17:01 +01:00
Simon Sessingø
00c9f9cafd Update composer.json 2021-03-17 19:16:08 +01:00
Simon Sessingø
0fe2733c85 Merge pull request #445 from KarelWintersky/patch-1
Update README.md
2021-03-17 19:14:15 +01:00
Simon Sessingø
ce3a2014d1 Merge pull request #449 from jatubio/patch-4
Fix 'must be an instance of Closure, array given' error when $closure is a object method.
2021-03-17 19:12:00 +01:00
Simon Sessingø
27cd8b8a1f Added support for objects like array etc as default-value. Value is now less strict. 2021-03-17 15:43:00 +01:00
Alex Blackham
93c0622b9d Altered variable name in foreach to be less ambiguous. 2019-06-21 10:45:57 +01:00
Alex Blackham
572ba1695b The input()->all method will now set every key specified in the filter. If the key doesn't exist it will be set to null. 2019-06-21 10:44:31 +01:00
Stefan Warnat
1c5701a297 Update compsoer.json 2019-05-19 11:02:09 +02:00
Stefan Warnat
11df7ca18c Fix warning, because of wrong calculated cookie expiration timestamp 2019-02-09 11:04:07 +01:00
Juan Antonio Tubio
b21feca1fc Update IClassLoader.php
Fix 'must be an instance of Closure, array given' error when $closure is a object method.
2019-02-08 21:40:04 +01:00
Juan Antonio Tubio
2a3238f30a Update ClassLoader.php
Fix 'must be an instance of Closure, array given' error when $closure is a object method.
2019-02-08 21:36:58 +01:00
Karel Wintersky
cb141314f7 Update README.md
fix https://github.com/skipperbent/simple-php-router/issues/444
2019-01-28 17:43:11 +03:00
Simon Sessingø
153f8630f2 Merge pull request #435 from skipperbent/v4-release
V4 release
2018-11-25 00:47:26 +01:00
Simon Sessingø
b715c48415 Merge pull request #434 from skipperbent/v4-development
Version 4.2.0.6
4.2.0.6
2018-11-25 00:47:02 +01:00