File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/Symfony/Component/Routing Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,30 @@ public function addOptions(array $options)
318
318
}
319
319
}
320
320
321
+ /**
322
+ * Sets the schemes (e.g. 'https') all child routes are restricted to.
323
+ *
324
+ * @param string|array $schemes The scheme or an array of schemes
325
+ */
326
+ public function setSchemes ($ schemes )
327
+ {
328
+ foreach ($ this ->routes as $ route ) {
329
+ $ route ->setSchemes ($ schemes );
330
+ }
331
+ }
332
+
333
+ /**
334
+ * Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.
335
+ *
336
+ * @param string|array $methods The method or an array of methods
337
+ */
338
+ public function setMethods ($ methods )
339
+ {
340
+ foreach ($ this ->routes as $ route ) {
341
+ $ route ->setMethods ($ methods );
342
+ }
343
+ }
344
+
321
345
/**
322
346
* Returns an array of resources loaded to build this collection.
323
347
*
You can’t perform that action at this time.
0 commit comments