Routing: Method needs to be uppercase

This commit is contained in:
Bart Visscher 2012-07-31 22:33:11 +02:00
parent 3e8b6e816a
commit ca1454ab1a
2 changed files with 6 additions and 6 deletions

View File

@ -10,27 +10,27 @@ use Symfony\Component\Routing\Route;
class OC_Route extends Route {
public function method($method) {
$this->setRequirement('_method', $method);
$this->setRequirement('_method', strtoupper($method));
return $this;
}
public function post() {
$this->method('post');
$this->method('POST');
return $this;
}
public function get() {
$this->method('get');
$this->method('GET');
return $this;
}
public function put() {
$this->method('put');
$this->method('PUT');
return $this;
}
public function delete() {
$this->method('delete');
$this->method('DELETE');
return $this;
}

View File

@ -49,7 +49,7 @@ class OC_Router {
if (isset($parameters['action'])) {
$action = $parameters['action'];
if (!is_callable($action)) {
var_dump($action);
var_dump($action);
throw new Exception('not a callable action');
}
unset($parameters['action']);