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 over 8 years ago
getIp
in HttpRequest
class sometimes not picking up local-ip.param[id]=value
) causing array-to-string notice.setDefaultNamespace
method in RouterBase
chainable.SimpleRouter
class.Input
classes from Pecee-framework to enable easy access of input-parameters from custom controllers.Published by skipperbent over 8 years ago
routeRequest
method in RouterBase
to ensure all router urls has been initialized.Published by skipperbent over 8 years ago
RouterBase
and is therefore not enabled by default. Please read notes section below for more information.CSRF-token are no longer initiated by RouterBase
. That means that the router will have no CSRF security enabled by default. To add this functionality, please add this line to your custom router-class or routes.php
file:
SimpleRouter::csrfVerifier(new \Pecee\Http\Middleware\BaseCsrfVerifier());
You can use custom exception handling like shown in the documentation. You classes need to implement the IExceptionHandler
interface.
Published by skipperbent over 8 years ago
/route
) to have higher priority than (/route/match
) in some cases.Published by skipperbent over 8 years ago
Published by skipperbent over 8 years ago
rewrite_uri
parameter to Request
class.Published by skipperbent over 8 years ago
Published by skipperbent over 8 years ago
Published by skipperbent over 8 years ago
RouterException
to Exception
namespace.Published by skipperbent over 8 years ago
Published by skipperbent over 8 years ago
domain
and/or prefix
doesn't match the current route.Published by skipperbent over 8 years ago
HTTP_X_FORWARDED_PROTO
http header in isSecure
method.Published by skipperbent over 8 years ago
httpCode
parameter to redirect
method in Response
class.Published by skipperbent over 8 years ago
urldecode
to RouterRessource
, RouterRoute
and RouterController
classes to ensure that urls with special letters (for example danish characters like: æ, ø, å) can be picked up by a custom regular expression (match parameter).Published by skipperbent almost 9 years ago
Published by skipperbent almost 9 years ago
getRoute()
.Published by skipperbent almost 9 years ago
action
parameter was set before using it in RouterResource
class.Published by skipperbent almost 9 years ago
loadedRoute
to Request
class so it can be easily overwritten from middleware.Published by skipperbent almost 9 years ago
Published by skipperbent almost 9 years ago
/
).