瀏覽代碼

[Routing] XMLFileLoader small optimization

Victor Berchet 14 年之前
父節點
當前提交
61be2b7986
共有 1 個文件被更改,包括 1 次插入3 次删除
  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)) {