8000 WIP [Routing] add scheme and method route definition option by Tobion · Pull Request #6049 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

WIP [Routing] add scheme and method route definition option #6049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 15, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Load 8000 ing
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added scheme and method setter in RouteCollection
  • Loading branch information
Tobion committed Dec 11, 2012
commit 2834e7ef21b9f6e9d9d1e6beeb1b0a2bd77f5f7e
24 changes: 24 additions & 0 deletions src/Symfony/Component/Routing/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,30 @@ public function addOptions(array $options)
}
}

/**
* Sets the schemes (e.g. 'https') all child routes are restricted to.
*
* @param string|array $schemes The scheme or an array of schemes
*/
public function setSchemes($schemes)
{
foreach ($this->routes as $route) {
$route->setSchemes($schemes);
}
}

/**
* Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.
*
* @param string|array $methods The method or an array of methods
*/
public function setMethods($methods)
{
foreach ($this->routes as $route) {
$route->setMethods($methods);
}
}

/**
* Returns an array of resources loaded to build this collection.
*
Expand Down
0