@@ -197,37 +197,20 @@ private function parseDefinition($id, \DOMElement $service, $file)
197
197
$ parameters [$ normalizedName ] = XmlUtils::phpize ($ node ->nodeValue );
198
198
}
199
199
// keep not normalized key for BC too
200
- $ parameters [$ name ] = SimpleXMLElement ::phpize ($ value );
200
+ $ parameters [$ name ] = XmlUtils ::phpize ($ node -> nodeValue );
201
201
}
202
202
203
- // $definition->addTag((string) $tag['name'], $parameters);
204
203
$ definition ->addTag ($ tag ->getAttribute ('name ' ), $ parameters );
205
204
}
206
205
207
- if (isset ( $ service[ 'decorates ' ] )) {
208
- $ renameId = isset ( $ service[ 'decoration-inner-name ' ] ) ? ( string ) $ service[ 'decoration-inner-name ' ] : null ;
209
- $ definition ->setDecoratedService (( string ) $ service [ ' decorates
8000
' ] , $ renameId );
206
+ if ($ value = $ service-> getAttribute ( 'decorates ' )) {
207
+ $ renameId = $ service-> hasAttribute ( 'decoration-inner-name ' ) ? $ service-> getAttribute ( 'decoration-inner-name ' ) : null ;
208
+ $ definition ->setDecoratedService ($ value , $ renameId );
210
209
}
211
210
212
211
$ this ->container ->setDefinition ($ id , $ definition );
213
212
}
214
213
215
- /**
216
- * Parses a XML file.
217
- *
218
- * @param string $file Path to a file
219
- *
220
- * @return SimpleXMLElement
221
- *
222
- * @throws InvalidArgumentException When loading of XML file returns error
223
- */
224
- protected function parseFile ($ file )
225
- {
226
- $ dom = $ this ->parseFileToDOM ($ file );
227
-
228
- return simplexml_import_dom ($ dom , 'Symfon
8000
y \\Component \\DependencyInjection \\SimpleXMLElement ' );
229
- }
230
-
231
214
/**
232
215
* Parses a XML file to a \DOMDocument
233
216
*
@@ -237,7 +220,7 @@ protected function parseFile($file)
237
220
*
238
221
* @throws InvalidArgumentException When loading of XML file returns error
239
222
*/
240
- protected function parseFileToDOM ($ file )
223
+ private function parseFileToDOM ($ file )
241
224
{
242
225
try {
243
226
$ dom = XmlUtils::loadFile ($ file , array ($ this , 'validateSchema ' ));
0 commit comments