Commit 45dc2bcc authored by Jim's avatar Jim Committed by Fabien Potencier

Add options request capability to controller collection

parent 7ca60854
......@@ -135,6 +135,19 @@ class ControllerCollection
{
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment