diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index d224d79108..c362f17e46 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -251,11 +251,23 @@ class Route implements \Serializable return $this; } + /** + * Checks if a scheme requirement has been set. + * + * @param string $scheme + * + * @return bool true if the scheme requirement exists, otherwise false + */ + public function hasScheme($scheme) + { + return in_array(strtolower($scheme), $this->schemes, true); + } + /** * Returns the uppercased HTTP methods this route is restricted to. * So an empty array means that any method is allowed. * - * @return array The schemes + * @return array The methods */ public function getMethods() {