Simon Sessingø
5a501db767
[TASK] Csrf-token fixes + readded BaseCsrfVerifier.
...
- Readded BaseCsrfVerifier middleware.
- Csrf-token expire time is now updated on each page refresh.
- CSRF-token update now happens after the route has been loaded, to ensure
no faulty "Invalid csrf-token" exceptions.
2015-12-14 13:36:38 +01:00
Simon Sessingø
4f07f38cf5
[BUGFIX] Fixed getting current route not always returning current url.
2015-12-12 23:38:48 +01:00
Simon Sessingø
c67ab20ddd
[BUGFIX] Merge current parameters with new provided ones.
2015-12-12 22:53:25 +01:00
Simon Sessingø
ad1ce21c66
[BUGFIX] Fixed getParams not being passed when using getRoute on current
...
route.
2015-12-12 20:42:06 +01:00
Simon Sessingø
23ee53060e
Merge branch 'development' of https://github.com/skipperbent/simple-php-router into development
...
Conflicts:
src/Pecee/SimpleRouter/RouterBase.php
2015-12-11 18:23:19 +01:00
Simon Sessingø
77ba9f165e
[BUGFIX] Fixed get params warning.
2015-12-11 18:21:00 +01:00
Simon Sessingø
0bec524606
[OPTIMISATION] Optimisations + bugfixes.
...
- Fixed references to Pecee framework.
- Fixed variables not being initialised before usage.
- Cleaned up duplicate checks.
- Other small optimisations and bugfixes.
2015-12-11 18:06:52 +01:00
Simon Sessingø
cede827a45
[BUGFIX] Fixed error with RouterGroup.
2015-12-10 21:22:14 +01:00
Simon Sessingø
e1c549bfdb
[OPTIMISATION] Added missing return statement
2015-12-10 19:55:48 +01:00
Simon Sessingø
6c56947792
[FEATURE] Added support for domains array on group.
...
- Group will not render if one or more domain does not match.
2015-12-10 04:42:50 +01:00
Simon Sessingø
59956d5fca
[BUGFIX] Optimisations + bugfixes.
2015-12-10 04:12:44 +01:00
Simon Sessingø
3ba2cec8af
[OPTIMISATION] Optimised more foreach loops to improve performance.
2015-12-10 03:41:10 +01:00
Simon Sessingø
d36880e9a0
[OPTIMISATION] Optimised routes loop.
2015-12-10 03:36:50 +01:00
Simon Sessingø
c74d83796f
[FEATURE] Added sub-domain routing.
...
- Updated documentation.
2015-12-10 03:31:57 +01:00
Simon Sessingø
2128a24f1c
[FEATURE] Added support for domain regex matching.
...
- Also improved regex matching when using custom regular expressions.
2015-12-10 01:34:35 +01:00
Simon Sessingø
b1768d86f7
[TASK] Removed baseCfsrVerifier from constructor to make it completely
...
optional (to increase speed on project which doesn't need it).
2015-12-08 16:29:12 +01:00
Simon Sessingø
1d8e7c2caf
[TASK] Optimised cache method in Response class.
2015-12-05 03:53:50 +01:00
Simon Sessingø
8efec07a8b
[FEATURE]
...
- Added support for custom ExceptionHandlers on group level.
- Routes now contain parent group, if any.
- Fixed wrong usage of required parameter.
2015-11-22 20:24:43 +01:00
Simon Sessingø
a9e7a33ff8
[...] Stuff from previous commit
2015-11-22 19:47:11 +01:00
Simon Sessingø
5393aa3200
[TASK] RouterRoute now throws exception is required parameter is not
...
filled.
2015-11-22 19:44:09 +01:00
Simon Sessingø
f2ffd83376
[TASK] If parameter is empty set RouterRoute not set the value to null.
2015-11-22 19:39:11 +01:00
Simon Sessingø
c4bff83ac4
[BUGFIX] Fixed route not matching when two params added next to each
...
other.
2015-11-21 21:00:15 +01:00
Simon Sessingø
3533ff8906
[TASK] Added support for letters (before it was only numbers) in default parameter regex.
2015-11-21 20:47:46 +01:00
Simon Sessingø
02de9572fa
[BUGFIX] Fixed parameters on custom regex match.
2015-11-21 20:31:44 +01:00
Simon Sessingø
e5700477e0
[BUGFIX] Fixed optinal parameters not availible when getting route.
...
[BUGFIX] Fixed optinal parameters not availible in url.
2015-11-21 19:43:23 +01:00
Simon Sessingø
3b4954821a
[FEATURE] Optimised route matching, added optional parameters.
...
- Optimised route matching. This should be way more officient and also
seems to fix issues with getting the current route using the getRoute class.
- Added support for optional routes, for example: {id?}.
- Updated documentation to reflect new changes.
2015-11-21 19:31:06 +01:00
Simon Sessingø
b930c06683
[BUGFIX] Fixed support for urls like /path/{param}/path
2015-11-20 07:17:49 +01:00
Simon Sessingø
19dc295199
[FEATURE] Added getIsSecure method to Request class.
2015-11-18 19:19:15 +01:00
Simon Sessingø
388c027d04
[BUGFIX] Group will now always be rendered no matter of what prefix is.
2015-11-17 00:55:59 +01:00
Simon Sessingø
eb93584d85
[BUGFIX] Fixed routeMatch in RouterEntry not matching routes with multiple
...
arguments.
2015-11-14 22:21:11 +01:00
Simon Sessingø
3fc81b6492
[TASK] Readded Pecee folder.
2015-11-02 08:08:49 +01:00
Simon Sessingø
b400b86322
[TASK] Removed Pecee folder.
2015-11-02 08:06:49 +01:00
Simon Sessingø
889ceaa37f
[OPTIMISATION] Fixed Group only loading middleware when initialised.
2015-11-01 10:24:05 +01:00
Simon Sessingø
3dd9dba029
[FEATURE] All headers in Request class now has lowercased keys.
2015-11-01 10:13:00 +01:00
Simon Sessingø
be277f276f
[FEATURE] Added support for patch.
...
- Put now also allow patch request types.
2015-11-01 09:21:47 +01:00
Simon Sessingø
f215eaa9cf
[BUGFIX] Bugfixes and optimisations
...
- Fixed support for multiple middlewares using array.
- Fixed match and parameters-match not not being merged when used on group.
2015-11-01 09:11:17 +01:00
Simon Sessingø
b3f8910cab
[TASK] Removed Middleware class.
2015-11-01 08:28:28 +01:00
Simon Sessingø
8557741083
[FEATURE] Bugfixes and optimisations
...
- Changed Middleware to interface - as it's easier to inherit and use in
other frameworks/projects.
- RouterController now loads method based on request-method.
- Changed references to old Middleware abstract class.
- Middleware must now be instance of IMiddleware instead of Middleware
class.
2015-11-01 08:23:46 +01:00
Simon Sessingø
637b998f02
[TASK] Made RouterBase use singleton HttpRequest class.
2015-11-01 07:48:29 +01:00
Simon Sessingø
aca7d3d503
[FEATURE] Added magic method getters and setters, and made request a
...
singleton applied configuration can be availible from everywhere.
2015-11-01 07:44:13 +01:00
Simon Sessingø
846c9e6584
[BUGFIX] Optimised getRoute for custom urls.
2015-11-01 07:36:13 +01:00
Simon Sessingø
649ed28a91
[BUGFIX] Fixed Exceptions due to route null value.
2015-10-30 02:27:44 +01:00
Simon Sessingø
a2edc1504c
[BUGFIX] Fixed regular expression matching after last release.
2015-10-28 05:04:11 +01:00
Simon Sessingø
bc16388613
[OPTIMISATION] Optimised middleware loading and routes.
2015-10-27 17:35:56 +01:00
Simon Sessingø
d3ed3a61b5
[BUGFIX] Middlewares are no longer loaded on invalid routes
2015-10-27 16:42:39 +01:00
Simon Sessingø
c2cf2334e7
[OPTIMISATION] Optimised router handling - router will now use the order provided when loading routes.
2015-10-27 14:01:19 +01:00
Simon Sessingø
f5a32cf520
[BUGFIX] Fixed router paths.
2015-10-27 10:35:57 +01:00
Simon Sessingø
1843ea0594
[BUGFIX] Fixed routes always matching /show/{id} when other routes are added.
2015-10-27 10:29:40 +01:00
Simon Sessingø
5e5a424ee8
[BUGFIX] Bugfixes
...
- getUri() method in Request class no longer appends "/".
- Optimised parseParameters method in RouterRoute class for regex matches.
2015-10-25 15:29:14 +01:00
Simon Sessingø
ac2993f804
[BUGFIX] Bugfixes and optimisations
...
- When no parameter is recieved, router now returns null instead of empty
string.
- json method in Response class now stops response after execution.
- Updated composer.json with correct autoload.
2015-10-25 02:34:25 +02:00