Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
Add options request capability to controller collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jimdoescode authored and fabpot committed May 8, 2015
1 parent 7ca6085 commit 45dc2bc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Silex/ControllerCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ public function delete($pattern, $to = null)
{
return $this->match($pattern, $to)->method('DELETE');
}

/**
* Maps an OPTIONS request to a callable.
*
* @param string $pattern Matched route pattern
* @param mixed $to Callback that returns the response when matched
*
* @return Controller
*/
public function options($pattern, $to = null)
{
return $this->match($pattern, $to)->method('OPTIONS');
}

/**
* Maps a PATCH request to a callable.
Expand Down

0 comments on commit 45dc2bc

Please sign in to comment.