27
27
class YamlFileLoader extends FileLoader
28
28
{
29
29
private static $ availableKeys = array (
30
- 'resource ' , 'type ' , 'prefix ' , 'path ' , 'host ' , 'schemes ' , 'methods ' , 'defaults ' , 'requirements ' , 'options ' , 'condition ' ,
30
+ 'resource ' , 'type ' , 'prefix ' , 'path ' , 'host ' , 'schemes ' , 'methods ' , 'defaults ' , 'requirements ' , 'options ' , 'condition ' , ' utf8 ' ,
31
31
);
32
32
private $ yamlParser ;
33
33
@@ -114,8 +114,9 @@ protected function parseRoute(RouteCollection $collection, $name, array $config,
114
114
$ schemes = isset ($ config ['schemes ' ]) ? $ config ['schemes ' ] : array ();
115
115
$ methods = isset ($ config ['methods ' ]) ? $ config ['methods ' ] : array ();
116
116
$ condition = isset ($ config ['condition ' ]) ? $ config ['condition ' ] : null ;
117
+ $ utf8 = isset ($ config ['utf8 ' ]) ? $ config ['utf8 ' ] : null ;
117
118
118
- $ route = new Route ($ config ['path ' ], $ defaults , $ requirements , $ options , $ host , $ schemes , $ methods , $ condition );
119
+ $ route = new Route ($ config ['path ' ], $ defaults , $ requirements , $ options , $ host , $ schemes , $ methods , $ condition, $ utf8 );
119
120
120
121
$ collection ->add ($ name , $ route );
121
122
}
@@ -139,6 +140,7 @@ protected function parseImport(RouteCollection $collection, array $config, $path
139
140
$ condition = isset ($ config ['condition ' ]) ? $ config ['condition ' ] : null ;
140
141
$ schemes = isset ($ config ['schemes ' ]) ? $ config ['schemes ' ] : null ;
141
142
$ methods = isset ($ config ['methods ' ]) ? $ config ['methods ' ] : null ;
143
+ $ utf8 = isset ($ config ['utf8 ' ]) ? $ config ['utf8 ' ] : null ;
142
144
143
145
$ this ->setCurrentDir (dirname ($ path ));
144
146
@@ -154,8 +156,8 @@ protected function parseImport(RouteCollection $collection, array $config, $path
154
156
if (null !== $ schemes ) {
155
157
$ subCollection ->setSchemes ($ schemes );
156
158
}
157
- if (null !== $ methods ) {
158
- $ subCollection ->setMethods ( $ methods );
159
+ if ($ utf8 ) {
160
+ $ subCollection ->setUtf8 ( true );
159
161
}
160
162
$ subCollection ->addDefaults ($ defaults );
161
163
$ subCollection ->addRequirements ($ requirements );
0 commit comments