Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
Published by skipperbent about 7 years ago
Published by skipperbent about 7 years ago
/testing
matching /test/{anything}
(issue: #248 - thanks @jatubio).Published by skipperbent over 7 years ago
composer.json
tags.Published by skipperbent over 7 years ago
Router::error($callback)
method to Router
class (issue #238).getController
and getMethod
when callback is an object (issue #239).addExceptionHandler
to IGroupRoute
interface and RouteGroup
class.NotFoundHttpException
to show redirected routes (issue: #240 )RouterException
class.CallbackExceptionHandler
and SimpleRouter
classes.addMiddleware
in Route
class and IRoute
interface.setMiddleware
in Route
class now marked as deprecated and will be removed in upcoming releases.addMiddleware
now accept both object and class strings in Route
class.addExceptionHandler
now accept both object and class strings in RouteGroup
class.testRewriteExceptionMessage
in RouterRewriteTest
.testSimularUrls
to testSimilarUrls
in RouterUrlTest
.XSRF-TOKEN
constant to CSRF-TOKEN
in CsrfToken
class..gitignore
.Please read this section carefully, as it contains changes that might impact the way the application works in your projects.
- setMiddleware
in Route
class now marked as deprecated and will be removed in upcoming releases.
The setMiddleware
method is now deprecated and will be removed in the near future. Please change all references in your project to use the addMiddleware
method instead.
- Renamed XSRF-TOKEN
constant to CSRF-TOKEN
in CsrfToken
class.
XSRF-TOKEN
constant has been renamed to CSRF-TOKEN
. This might temporarily make postbacks invalid upon updating until users begin to use the changed value.
Many thanks to the people that contributed with ideas, bugs etc.
Published by skipperbent over 7 years ago
For information on new features, please refer to the documentation here:
https://github.com/skipperbent/simple-php-router#custom-default-regex-for-matching-parameters
Published by skipperbent over 7 years ago
CsrfToken
class to ensure that IV generation is strong and secure.Published by skipperbent over 7 years ago
RouteController
not matching on certain urls.RouteResource
more strict in url-matching.RouterControllerTest
class.testSimularUrls
method in RouterUrlTest
.Published by skipperbent over 7 years ago
RouteResource
class.IRestController
to IResourceController
.TestRouter
custom router class.The IRestController
interface has been renamed to IResourceController
.
Published by skipperbent over 7 years ago
RouterController
routes with absolute namespaces.RouteController
and RouteResource
.RouteController
. Fix should provide better url-matching.RouterResource
always matching first url when having similar urls (ex: /funny-cat
and /funny-dog
) - thanks to: @AybimYazilim for reporting this issue.loadRoutes
method to Router
class so routes now can be loaded without routing the request (useful when running in Cli etc).Router::getInstance
method. Please use SimpleRouter::router()
for singleton usage instead.getRemoteAddr
alias-method for getIp
in Request
class.getValue
to IInputItem
interface.Router::getInstance()
to SimpleRouter::router()
.Published by skipperbent over 7 years ago
SimpleRouter::resource
.Published by skipperbent over 7 years ago
$request->setRewriteRoute($route);
rewrite-callback now renders any added middlewares on the route.Published by skipperbent over 7 years ago
null
value.Published by skipperbent over 7 years ago
null
value.Published by skipperbent over 7 years ago
IExceptionHandler
or IMiddleware
.Published by skipperbent over 7 years ago
getExtension
method in InputFile
always returning empty value.Published by skipperbent almost 8 years ago
where
method in Route
class calling itself instead of setWhere
causing infinite loop.Published by skipperbent almost 8 years ago
getUrl
will now use default-parameter value if specifically set to null when using url()
.Published by skipperbent almost 8 years ago
Published by skipperbent almost 8 years ago
Published by skipperbent almost 8 years ago
Route
to RouteLoadable
where it belongs.loadClass
to Route
.$filterEmptyParams
property.RouteUrl
).renderRoute
to Route
- no need in written the same code everywhere.PARAMETERS_REGEX_MATCH
-regex in Route
class.