Commit Graph

137 Commits

Author SHA1 Message Date
Simon Sessingø dfc12d07b0 Merge pull request #508 from skipperbent/v4-bootmanager-fix
[BUGFIX] BootManager findRoute not working.
2021-03-23 14:56:16 +01:00
Simon Sessingø e721a92156 Updated readme 2021-03-23 01:25:57 +01:00
Simon Sessingø 67211e5332 Updated readme + gitignore 2021-03-23 01:24:17 +01:00
Simon Sessingø 6686de46b9 Updated link to simple-router demo. 2021-03-22 20:35:42 +01:00
Simon Sessingø 801f1e68cc [BUGFIX] BootManager findRoute not working.
- Fixed findRoute not working in BootManager as reported by issue: #448
- Added more comprehensive php-unit tests for bootmanagers including findUrl.
2021-03-22 18:05:27 +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ø 19b1a14dec Parameters are by default now using regex [\w\-]+ (supports dashes) to avoid confusion. 2021-03-18 03:24:47 +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ø 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ø d38f81836d Development
- Added new Redirect method to SimpleRouter class.
- Changed method-names in InputHandler for better description.
- Fixed return-types for InputHandler for collections.
- Added unit-tests for InputHandler (get, post).
- Optimisations.
2018-04-06 17:20:00 +02:00
Simon Sessingø 30a2ddeed9 Development
- Added new event when adding route.
- Added `prependUrl` method to `LoadableRoute` class.
- Added unit-test for add-route event.
- Updated documentation to reflect new changes.
2018-04-02 14:53:36 +02:00
Simon Sessingø 5df0c12864 Updated helpers 2018-03-30 05:54:12 +02:00
Simon Sessingø a1dc4c5119 Bugfixes
- Updated `input` helper function.
- Update documentation to reflect v4 changes in `InputHandler` class.
2018-03-29 22:35:21 +02:00
Simon Sessingø a11595fb86 Bugfixes
- Fixed `$methods` argument not properly passed in `InputHandler` class.
- Updated helpers.php with latest changes.
2018-03-29 22:17:53 +02:00
Simon Sessingø 8eded4a619 Updated documentation. 2018-03-29 21:19:52 +02:00
Simon Sessingø af2ac6031d Development
- Added dependency injection support.
- Added php-di composer dependency.
- Added `ClassLoader` class.
- Added `IClassLoader` interface.
- Added unit-tests for dependency injection.
- Updated documentation to reflect new features.
2018-03-29 21:16:02 +02:00
Simon Sessingø cca2f5cb88 Added donate option 2018-03-29 19:13:55 +02:00
Simon Sessingø 1a59a659fe Updated documentation 2018-03-29 19:02:31 +02:00
Simon Sessingø 4c61899560 Updated documentation 2018-03-29 19:00:18 +02:00
Simon Sessingø 931b50098c Updated documentation 2018-03-29 18:54:03 +02:00
Simon Sessingø f5a023117a Development
- Added event-arguments data.
- Added event-arguments to the event list in documentation.
- Fixed missing exceptions thrown in phpDocs.
- Added unit-tests for new event functionality.
2018-03-29 18:51:28 +02:00
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ø 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 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 Sessingo 50c6499efb Simplified url-rewriting and callback handling. 2018-02-24 05:35:05 +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 Sessingo 6547c07113 Fixed spelling in documentation 2017-11-20 21:53:41 +01:00
Juan Antonio Tubio 74177a2082 Update README.md 2017-11-04 00:59:52 +01:00
Juan Antonio Tubio 2221bced4f Update README.md 2017-11-04 00:27:13 +01:00
Juan Antonio Tubio 6559278511 Documentation: Add file exception rules samples to IIS web.config 2017-11-04 00:19:51 +01:00
Simon Sessingø cc5e417db9 Update README.md 2017-10-23 22:05:27 +02:00
Simon Sessingø 2cc90e28d0 Update README.md 2017-10-23 22:04:28 +02:00
Simon Sessingø eb63a5d6ba Added CSRF form-example in documentation (issue: #299) 2017-10-23 22:01:19 +02:00
Simon Sessingø 4ba15033d9 Readded csrf_token helper function - don't run away this time. 2017-09-09 01:40:44 +01:00
Simon Sessingø 98ad310404 Updated documentation. 2017-09-03 18:36:41 +01:00
Simon Sessingø a5aac57ce9 Added RoutePartialGroup support. 2017-09-03 18:24:51 +01:00
Simon Sessingø 52e0f5ef94 Removed link from documentation that has been moved. 2017-09-01 18:01:56 +01:00
Simon Sessingø c1aa5782a1 Merge pull request #271 from skipperbent/v3-feature-uri
Added Uri class which can be used to parse urls.
2017-08-23 22:17:04 +02:00
Simon Sessingø 387d9710d8 Merge pull request #272 from jatubio/patch-1
Add IIS web.config file example
2017-08-23 22:16:53 +02:00
Simon Sessingø fd098266f7 Merge pull request #266 from zaingithub/patch-1
Update README.md
2017-08-23 22:16:24 +02:00
Simon Sessingø c7473938c5 Changed xxx to web.config 2017-08-23 22:09:55 +02:00
Simon Sessingø 65c811356d Fixed url parsing for unicode characters. 2017-08-23 21:04:11 +01:00
Juan Antonio Tubio 6fb92d7cae Add IIS web.config file example 2017-08-23 17:28:14 +02:00
zaingithub 8720e732e1 Update README.md
Update section : ## Handling 404, 403 and other errors

$exception->getCode to $exception->getCode()
2017-08-20 12:47:27 +07:00
Simon Sessingø 7e8cb91f68 Updated documentation 2017-08-19 16:21:55 +01:00