Ver Fonte

[Routing] XMLFileLoader small optimization

Victor Berchet há 14 anos atrás
pai
commit
61be2b7986
1 ficheiros alterados com 1 adições e 3 exclusões
  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)) {