Explorar o código

[Routing] XMLFileLoader small optimization

Victor Berchet %!s(int64=14) %!d(string=hai) anos
pai
achega
61be2b7986
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/Symfony/Component/Routing/Loader/XmlFileLoader.php

+ 1 - 3
src/Symfony/Component/Routing/Loader/XmlFileLoader.php

@@ -153,9 +153,7 @@ class XmlFileLoader extends FileLoader
      */
     protected function validate(\DOMDocument $dom)
     {
-        $parts = explode('/', str_replace('\\', '/', __DIR__.'/schema/routing/routing-1.0.xsd'));
-        $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
-        $location = 'file:///'.$drive.implode('/', $parts);
+        $location = __DIR__.'/schema/routing/routing-1.0.xsd';
 
         $current = libxml_use_internal_errors(true);
         if (!$dom->schemaValidate($location)) {