We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ecf45c commit ad0d93bCopy full SHA for ad0d93b
src/Symfony/Component/Routing/Route.php
@@ -251,11 +251,23 @@ public function setSchemes($schemes)
251
return $this;
252
}
253
254
+ /**
255
+ * Checks if a scheme requirement has been set.
256
+ *
257
+ * @param string $scheme
258
259
+ * @return bool true if the scheme requirement exists, otherwise false
260
+ */
261
+ public function hasScheme($scheme)
262
+ {
263
+ return in_array(strtolower($scheme), $this->schemes, true);
264
+ }
265
+
266
/**
267
* Returns the uppercased HTTP methods this route is restricted to.
268
* So an empty array means that any method is allowed.
269
*
- * @return array The schemes
270
+ * @return array The methods
271
*/
272
public function getMethods()
273
{
0 commit comments