Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
45dc2bcc
Commit
45dc2bcc
authored
Mar 06, 2015
by
Jim
Committed by
Fabien Potencier
May 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add options request capability to controller collection
parent
7ca60854
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/Silex/ControllerCollection.php
src/Silex/ControllerCollection.php
+13
-0
No files found.
src/Silex/ControllerCollection.php
View file @
45dc2bcc
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment