comparison vendor/symfony/dependency-injection/Dumper/XmlDumper.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
45 $this->document = new \DOMDocument('1.0', 'utf-8'); 45 $this->document = new \DOMDocument('1.0', 'utf-8');
46 $this->document->formatOutput = true; 46 $this->document->formatOutput = true;
47 47
48 $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container'); 48 $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container');
49 $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); 49 $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
50 $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd'); 50 $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd');
51 51
52 $this->addParameters($container); 52 $this->addParameters($container);
53 $this->addServices($container); 53 $this->addServices($container);
54 54
55 $this->document->appendChild($container); 55 $this->document->appendChild($container);
288 $element->setAttribute('type', 'iterator'); 288 $element->setAttribute('type', 'iterator');
289 $this->convertParameters($value->getValues(), $type, $element, 'key'); 289 $this->convertParameters($value->getValues(), $type, $element, 'key');
290 } elseif ($value instanceof Reference) { 290 } elseif ($value instanceof Reference) {
291 $element->setAttribute('type', 'service'); 291 $element->setAttribute('type', 'service');
292 $element->setAttribute('id', (string) $value); 292 $element->setAttribute('id', (string) $value);
293 $behaviour = $value->getInvalidBehavior(); 293 $behavior = $value->getInvalidBehavior();
294 if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behaviour) { 294 if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
295 $element->setAttribute('on-invalid', 'null'); 295 $element->setAttribute('on-invalid', 'null');
296 } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behaviour) { 296 } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
297 $element->setAttribute('on-invalid', 'ignore'); 297 $element->setAttribute('on-invalid', 'ignore');
298 } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behaviour) { 298 } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
299 $element->setAttribute('on-invalid', 'ignore_uninitialized'); 299 $element->setAttribute('on-invalid', 'ignore_uninitialized');
300 } 300 }
301 } elseif ($value instanceof Definition) { 301 } elseif ($value instanceof Definition) {
302 $element->setAttribute('type', 'service'); 302 $element->setAttribute('type', 'service');
303 $this->addService($value, null, $element); 303 $this->addService($value, null, $element);