@@ -76,6 +76,7 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
76
76
$ resource = (string ) $ node ->getAttribute ('resource ' );
77
77
$ type = (string ) $ node ->getAttribute ('type ' );
78
78
$ prefix = (string ) $ node ->getAttribute ('prefix ' );
79
+ $ hostnamePattern = (string ) $ node ->getAttribute ('hostname-pattern ' );
79
80
80
81
$ defaults = array ();
81
82
$ requirements = array ();
@@ -102,7 +103,7 @@ protected function parseNode(RouteCollection $collection, \DOMElement $node, $pa
102
103
}
103
104
104
105
$ this ->setCurrentDir (dirname ($ path ));
105
- $ collection ->addCollection ($ this ->import ($ resource , ('' !== $ type ? $ type : null ), false , $ file ), $ prefix , $ defaults , $ requirements , $ options );
106
+ $ collection ->addCollection ($ this ->import ($ resource , ('' !== $ type ? $ type : null ), false , $ file ), $ prefix , $ defaults , $ requirements , $ options, $ hostnamePattern );
106
107
break ;
107
108
default :
108
109
throw new \InvalidArgumentException (sprintf ('Unable to parse tag "%s" ' , $ node ->tagName ));
@@ -154,7 +155,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $definiti
154
155
}
155
156
}
156
157
157
- $ route = new Route ((string ) $ definition ->getAttribute ('pattern ' ), $ defaults , $ requirements , $ options );
158
+ $ route = new Route ((string ) $ definition ->getAttribute ('pattern ' ), $ defaults , $ requirements , $ options, ( string ) $ definition -> getAttribute ( ' hostname-pattern ' ) );
158
159
159
160
$ collection ->add ((string ) $ definition ->getAttribute ('id ' ), $ route );
160
161
}
0 commit comments