Commit Graph

814 Commits

Author SHA1 Message Date
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
Simon Sessingø
d601e8eca3 Bugfixes and optimisations.
- Fix for __invoke methods (issue: #429)
- Fixed not being able to parse body of PUT request.
- BaseCsrfVerifier expects the field name to be "csrf-token" (issue: #432)
- Minor optimisations
2018-11-25 00:44:20 +01:00
Simon Sessingø
4a8b71a0b5 Merge pull request #430 from Tahrz/master
fix for __invoke methods (if there are only in class (Action))
2018-11-25 00:27:54 +01:00
Simon Sessingø
bd01a8a802 Merge pull request #431 from matheusheiden/master
Set HTTP method before initializing InputHandler
2018-11-25 00:27:30 +01:00
Matheus
55bcd4e030 Merge pull request #1 from matheusheiden/matheusheiden-patch-1
Set HTTP method before initializing InputHandler
2018-11-10 22:17:08 -02:00
Matheus
d4a6d504b1 Set HTTP method before initializing InputHandler
This is needed because without it the InputHandler doesn't know which http method is being used, and because of that it can't parse the body of a PUT request
2018-11-10 22:16:45 -02:00
Taras Victorovich
9e3b1b6baa fix for __invoke methods (if there are only in class (Action)) 2018-10-02 15:40:26 +03:00
Simon Sessingø
1395527cc6 Merge pull request #428 from skipperbent/v4-release
V4 release
2018-08-31 01:41:48 +02:00
Simon Sessingø
ac594ebde2 Merge pull request #427 from skipperbent/v4-development
Version 4.2.0.5
4.2.0.5
2018-08-31 01:41:36 +02:00
Simon Sessingø
064154f27f Merge pull request #426 from skipperbent/v4-optimisations
Optimizations
2018-08-31 01:41:05 +02:00
Simon Sessingø
0ac7fd559a Optimizations
- Settings parameter in group method are no longer optional.
- Updated README to contain PHP JSON-extension under requirements.
- Updated composer.json to include php json extension.
2018-08-31 01:40:21 +02:00
Simon Sessingø
da8dfdb135 Merge pull request #424 from skipperbent/v4-release
V4 release
2018-08-24 17:24:48 +02:00
Simon Sessingø
57c9da2c42 Merge pull request #423 from skipperbent/v4-development
Version 4.2.0.4
4.2.0.4
2018-08-24 17:24:25 +02:00
Simon Sessingø
6bdfe06223 Merge pull request #422 from skipperbent/v4-optional-character-fix
Fix for issue #421: Incorrectly optional character in route
2018-08-24 17:23:43 +02:00
Simon Sessingø
5c2a973214 Merge branch 'v4-development' into v4-optional-character-fix 2018-08-24 17:23:33 +02:00
Simon Sessingø
a7cbacbde7 Fix for issue #421: Incorrectly optional character in route 2018-08-24 17:16:02 +02:00
Simon Sessingø
f0c851e49d Merge pull request #417 from skipperbent/v4-release
V4 release
2018-04-22 05:37:41 +02:00
Simon Sessingø
45a5176b3c Merge pull request #416 from skipperbent/v4-development
Version 4.2.0.3
4.2.0.3
2018-04-22 05:37:29 +02:00
Simon Sessingø
2d042391aa Merge pull request #415 from skipperbent/v4-fix-input-all-empty
Fixed returning empty array when positing json (issue #413)
2018-04-22 05:36:10 +02:00
Simon Sessingo
4d842d0583 Fixed returning empty array when positing json (issue #413) 2018-04-22 05:35:15 +02:00
Simon Sessingø
7c54d319e6 Merge pull request #411 from skipperbent/v4-release
V4 release
2018-04-06 19:46:01 +02:00
Simon Sessingø
9ccff91287 Merge pull request #410 from skipperbent/v4-development
Version 4.2.0.2
4.2.0.2
2018-04-06 19:45:51 +02:00
Simon Sessingø
8653bfa86f Development
- Fixed 403 not allowed exception is now thrown as NotFoundHttpException.
- Added REQUEST_TYPE_HEAD to Route class.
- Minor optimizations.
2018-04-06 19:44:30 +02:00
Simon Sessingø
e51290dfd8 Merge pull request #409 from skipperbent/v4-release
V4 release
2018-04-06 18:04:28 +02:00
Simon Sessingø
13501b3f88 Merge pull request #408 from skipperbent/v4-development
Version 4.2.0.1
4.2.0.1
2018-04-06 18:04:01 +02:00
Simon Sessingø
b8cfc4eb0b Fixed default parameter for all method allowed to by empty. 2018-04-06 18:01:49 +02:00
Simon Sessingø
5db4621831 Added methods for adding get, post and file parameters manually. 2018-04-06 18:00:59 +02:00