A fast & flexible router
Throwable
s will now properly be caught and sent up the exception handling chain.Throwable
typesRoutePathCompilationException::createFromRoute()
method signature has changed to allow both Exception
and Throwable
types with dual support for PHP 5 and PHP 7Klein#onError
will now be able to receive Throwable
types under PHP 7file()
method in the Response
class has been updated to fix an issue found when run under PHP-FPMfile()
method in the Response
class will no longer send the Content-Length
header when the response has been chunked, to comply with the HTTP requirements defined in RFC 2616HeaderDataCollection::normalizeName()
method has been deprecated in favor of using new normalization options (via constant switches) and other more specific methods on the same classKlein#errorCallbacks
was renamed to Klein#error_callbacks
and it's array data-structure was changed to use an SplStack
Klein#httpErrorCallbacks
was renamed to Klein#http_error_callbacks
and it's array data-structure was changed to use an SplStack
Klein#afterFilterCallbacks
was renamed to Klein#after_filter_callbacks
and it's array data-structure was changed to use an SplQueue
Validator#defaultAdded
was renamed to Validator#default_added
abort()
method to allow stopping the routing process and returning a response codeRoute
class, instead of just being a set of meta properties and a callbackRouteCollection
class, which extends the DataCollection
classkeys()
and clear()
methods for the DataCollection
classisEmpty()
and cloneEmpty()
methods for the DataCollection
class$matched
route callback parameter is now an instance of a RouteCollection
, instead of just an integerAbstractRouteFactory
instance, allowing the building of routes to be customized more easilyoptions()
and head()
alias methods for matching OPTIONS and HEAD requests respectivelyResponse
class has been abstracted into an AbstractResponse
and a separate Response
class for cleaner 3rd-party extensionpatch()
alias method for matching PATCH requestsescape()
method in the ServiceProvider
class now allows for the passing of entity escaping flagscall_user_func()
callable behaviorfile()
and json()
methods in the Response
class no longer override system-configured time processing limits$methods_matched
) is now much more accurate, not counting methods that shouldn't have been considered matchesonHttpError()
method instead.Request $request
Response $response
Service $service
App $app
int $matched
array $methods_matched
Request $request
Response $response
Service $service
App $app
Klein $klein
RouteCollection $matched
array $methods_matched
$route->setCountMatch(true)