Commit Graph

664 Commits

Author SHA1 Message Date
Simon Sessingø
a9c03f9271 Development
- Updated `helpers.php` and helpers example in documentation.
- MalformedUrlException is now handled properly by Router to avoid phpStorm syntax highlights in routes.
- Added `getUrlCopy` to `Request` class, used to clone the current route (to keep domain etc.)
- `setUrl` in `Request` are now strict and requires `Url` object and no longer accepts strings.
- Renamed `hasRewrite` property to `hasPendingRewrite` in `Request` class.
- Renamed `hasRewrite` and `setHasRewrite` methods to `hasPendingRewrite` and `setHasPendingRewrite` in `Request` class.
- Added better usage of `Url` class. When calling `url` you can now use the methods on the `Url` class to filter params, get relative/absolute url etc. See documentation for more info.
- Renamed `get` method to `getValue` in `InputHandler` class.
- Renamed `getObject` to `get` and removed `$defaultValue` argument in `InputHandler` class.
- Optimized `InputHandler` class.
- Fixed issue with `$token` not being proper string in `BaseCsrfVerifier` when token is not found.
- Added php.ini configuration settings to `setcookie` in `CookieTokenProvider` for improved security.
- Added `$router` parameter to `boot` method in `IRouterBootManager` which allows for further manipulation of the router within the bootmanager.
- Renamed `$processingRoute` property to `$isProcessingRoute` in `Router` class.
- Fixed `reset` method not resetting CSRF-verifier in `Router` class.
- Moved `arrayToParams` helper-method from `Router` to `Url` class.
- Began to add Event-functionality to router.
- Added `addEventHandler` method to `SimpleRouter` class.
- Moved `Pecee\SimpleRouter\Handler\CallbackExceptionHandler` to `Pecee\SimpleRouter\Handlers\CallbackExceptionHandler`.
- Moved `Pecee\SimpleRouter\Handler\IExceptionHandler` to `Pecee\SimpleRouter\Handlers\IExceptionHandler`.
- Added Events section to documentation.
- Added more information on url-handling in documentation.
- Optimisations.
2018-03-29 18:17:42 +02:00
Simon Sessingø
aa56d45f9c Updated documentation 2018-03-29 10:13:23 +02:00
Simon Sessingø
ef4582dbe0 Fixed wrong return-type in loadClass. 2018-03-27 01:11:44 +02:00
Simon Sessingø
54ae830ec8 Merge pull request #386 from skipperbent/v4-php7-port
Version 4
4.0.0.0a
2018-03-26 23:57:54 +02:00
Simon Sessingø
085f98cf08 Development
- Better php7 support.
- Added easier way to debug router.
- Improvements and bugfixes.
- Updated documentation.
2018-03-26 23:43:27 +02:00
Simon Sessingø
f23d569757 Added support for PHP7 2018-03-20 03:38:55 +01:00
Simon Sessingo
d279d5598d Development
- Fixed issue with subdomains on groups.
- Fixed issue with loadble routes sometimes mistakenly inheriting wrong group.
- Routes will now check if group matches before matching any custom regex.
- Added setValue method to IInputItem class to streamline the InputFile and InputItem classes.
- Other minor optimisations.
- Documentation: fixed broken links and cleaned it up.
2018-03-03 23:37:14 +01:00
Simon Sessingo
be39010be3 Throw correct exception-types. 2018-02-27 08:58:57 +01:00
Simon Sessingo
79c82c90cc Fixed issue with PDO exception not returning correct type for error-code. 2018-02-27 08:20:25 +01:00
Simon Sessingo
6d7d07669b Optimisations 2018-02-27 00:19:44 +01:00
Simon Sessingo
98bf95bfc9 Added back getPath. 2018-02-27 00:14:01 +01:00
Simon Sessingo
b051bcf02b Stop router from processing routes if no valid route is found. 2018-02-27 00:12:45 +01:00
Simon Sessingo
b8d5106f4e Removed getPath from url. 2018-02-27 00:00:54 +01:00
Simon Sessingo
cfc9ac138a Fixed setUrl issue. 2018-02-26 23:48:09 +01:00
Simon Sessingo
a25be983b8 Development
- Renamed Uri class to Url.
- Renamed setUri and getUri to setUrl and getUrl.
- Added custom Exceptions and ensured that router only throws HttpExceptions.
- Added isAjax method to Request class.
- Added better phpDocs.
- Other minor optimisations.
2018-02-26 23:21:26 +01:00
Simon Sessingø
a0c5bbdcc0 Merge pull request #367 from skipperbent/v3-rewrite-update
Simplified url-rewriting and callback handling.
2018-02-24 05:36:37 +01:00
Simon Sessingo
50c6499efb Simplified url-rewriting and callback handling. 2018-02-24 05:35:05 +01:00
Simon Sessingo
55a96a441e Set default value to 0 to triggering error when calling getErrors on empty object. 2018-02-19 23:04:26 +01:00
Simon Sessingo
6b8c823427 Fixed: refresh now returns correct original url (params, querystrings etc). 2018-02-19 16:34:22 +01:00
Simon Sessingø
932dfbf2b7 Merge pull request #357 from skipperbent/v3-optimisations
Optimisations
2018-02-14 12:38:07 +01:00
Simon Sessingo
8d87aab35b Optimisations 2018-02-05 05:27:47 +01:00
Simon Sessingo
fc2e2e1e82 Fixed Input::all when php://input is not availible 2018-01-14 15:53:44 +01:00
Simon Sessingø
71518431a9 Merge pull request #348 from skipperbent/v3-fix-default-value
Fixed parameter default-value being overwritten (issue: #347).
2018-01-06 03:31:03 +01:00
Simon Sessingø
cec240ab0c Merge pull request #349 from skipperbent/feature-get-processed-routes
Added getProcessedRoutes method to Router class.
2018-01-06 03:30:55 +01:00
Simon Sessingo
4d2b584936 Fixed parameter default-value being overwritten (issue: #347). 2018-01-06 03:27:27 +01:00
Simon Sessingo
a102c70700 Added getProcessedRoutes method to Router class. 2018-01-06 01:23:00 +01:00
Simon Sessingo
f2d106c649 _method is not supported as fallback for every request-type. 2017-12-17 10:37:33 +01:00
Simon Sessingo
72d33dd497 Compatibility: setUri can be both string and Uri object. 2017-12-17 09:51:56 +01:00
Simon Sessingo
e23dd37435 Reverted changes 2017-12-16 23:29:00 +01:00
Simon Sessingo
aa5ec47051 Removed key check in __get as it's already performed in the __isset method. 2017-12-16 23:24:31 +01:00
Simon Sessingo
155729074b Fixed filtering on get-params in all method. 2017-12-16 12:48:10 +01:00
Simon Sessingø
0be7bfcfd9 Fixed utf-8 header issue (issue: #333) 2017-12-09 23:56:37 +01:00
Simon Sessingø
7f8d90eef8 Added $options and $debt param to json method in Response class. 2017-12-06 19:04:48 +01:00
Simon Sessingø
4bb784bcec Merge pull request #329 from skipperbent/v3-optimisations
Optimisations
2017-12-02 20:30:02 +01:00
Simon Sessingo
c4ee1b9186 Optimisations 2017-12-02 19:30:30 +01:00
Simon Sessingø
efd5159604 Bugfixes
- Fixed issue with parsing parameters on some occasion.
- Optimisations.
2017-11-27 02:03:12 +01:00
Simon Sessingø
bdfc36ed5c More Input-related optimisations. 2017-11-27 00:00:19 +01:00
Simon Sessingø
d921ae8105 Bugfixes
- Fixed minor issues with File Input-parsing.
- Optimized Input class.
2017-11-26 23:42:28 +01:00
Simon Sessingø
af2be14ccb Fixed url parsing issues 2017-11-26 18:45:06 +01:00
Simon Sessingø
fae2e84c98 Fixed typo 2017-11-26 18:29:00 +01:00
Simon Sessingø
c90c74b88f Merge pull request #317 from skipperbent/v3-optimisations
V3 optimisations
2017-11-26 18:06:37 +01:00
Simon Sessingø
05f2493304 Development
- Optimized Uri class.
- Request class now uses SimpleRouter to get default-namespace as was
originally the intended behavior.
- Documentation changes.
2017-11-26 18:03:14 +01:00
Simon Sessingø
0856caa9de Merge branch 'v3-development' of github.com:skipperbent/simple-php-router into v3-optimisations 2017-11-26 17:38:49 +01:00
Simon Sessingø
35dc26d741 Optimisations
- Fixed issue with `InputFile` not setting file-name properly.
- Fixed issue with `InputFile` not setting the correct index when
posting certain arrays.
- Made Csrf-token cookie provider more versitile by creating new
`CookieTokenProvider` and `ITokenProvider` classes.
- Strict-checks optimisations.
- Updated documentation to reflect new changes.
2017-11-26 17:32:33 +01:00
Simon Sessingø
f2819f866e Merge pull request #314 from skipperbent/v3-documentation-spelling
Fixed spelling in documentation
2017-11-25 01:34:01 +01:00
Simon Sessingø
b9aa348b38 Merge branch 'v3-development' of github.com:skipperbent/simple-php-router into v3-development 2017-11-25 01:32:24 +01:00
Simon Sessingø
c29c52ae16 Fixed default-namespace causing router to break on closures. 2017-11-25 01:31:43 +01:00
Simon Sessingo
6547c07113 Fixed spelling in documentation 2017-11-20 21:53:41 +01:00
Simon Sessingø
fde77969c0 Merge pull request #310 from skipperbent/v3-csrftoken-update
Csrf-token are now refreshed on each page-load to avoid timeout.
2017-11-10 13:02:23 +01:00
Simon Sessingø
c3072e8886 Csrf-token are now refreshed on each page-load to avoid timeout. 2017-11-10 12:59:59 +01:00