[FEATURE] Added support for patch.

- Put now also allow patch request types.
This commit is contained in:
Simon Sessingø
2015-11-01 09:21:47 +01:00
parent f215eaa9cf
commit be277f276f
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ class SimpleRouter {
public static function put($url, $callback, array $settings = null) {
$route = new RouterRoute($url, $callback);
$route->addSettings($settings);
$route->setRequestMethods(array(RouterRoute::REQUEST_TYPE_PUT));
$route->setRequestMethods(array(RouterRoute::REQUEST_TYPE_PUT, RouterRoute::REQUEST_TYPE_PATCH));
$router = RouterBase::getInstance();
$router->addRoute($route);