Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/dependency-injection/Loader/XmlFileLoader.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 |
---|---|
331 foreach ($tag->attributes as $name => $node) { | 331 foreach ($tag->attributes as $name => $node) { |
332 if ('name' === $name) { | 332 if ('name' === $name) { |
333 continue; | 333 continue; |
334 } | 334 } |
335 | 335 |
336 if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { | 336 if (false !== strpos($name, '-') && false === strpos($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { |
337 $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); | 337 $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); |
338 } | 338 } |
339 // keep not normalized key | 339 // keep not normalized key |
340 $parameters[$name] = XmlUtils::phpize($node->nodeValue); | 340 $parameters[$name] = XmlUtils::phpize($node->nodeValue); |
341 } | 341 } |
582 if (!$this->container->hasExtension($items[$i])) { | 582 if (!$this->container->hasExtension($items[$i])) { |
583 continue; | 583 continue; |
584 } | 584 } |
585 | 585 |
586 if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { | 586 if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { |
587 $path = str_replace($extension->getNamespace(), str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); | 587 $ns = $extension->getNamespace(); |
588 $path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); | |
588 | 589 |
589 if (!is_file($path)) { | 590 if (!is_file($path)) { |
590 throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s"', \get_class($extension), $path)); | 591 throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s"', \get_class($extension), $path)); |
591 } | 592 } |
592 | 593 |