mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #15739 from DavidPrevot/symfony-2.7
Replace `_method` requirement by {g,s}etMethods()
This commit is contained in:
commit
d4ac7ac723
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ class Route extends SymfonyRoute implements IRoute {
|
|||
* @return \OC\Route\Route
|
||||
*/
|
||||
public function method($method) {
|
||||
$this->setRequirement('_method', strtoupper($method));
|
||||
$this->setMethods($method);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ class Route extends SymfonyRoute implements IRoute {
|
|||
* @return \OC\Route\Route
|
||||
*/
|
||||
public function requirements($requirements) {
|
||||
$method = $this->getRequirement('_method');
|
||||
$method = $this->getMethods();
|
||||
$this->setRequirements($requirements);
|
||||
if (isset($requirements['_method'])) {
|
||||
$method = $requirements['_method'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue