Преглед изворни кода

[ClassLoader] removed ClassLoaderInterface

As the autoloader cannot autoload the interface, it makes things more complicated
for a very small benefit.
Fabien Potencier пре 14 година
родитељ
комит
80c2944c6e

+ 0 - 1
src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php

@@ -11,7 +11,6 @@
 
 namespace Symfony\Component\ClassLoader;
 
-require_once __DIR__.'/ClassLoaderInterface.php';
 require_once __DIR__.'/UniversalClassLoader.php';
 
 /**

+ 0 - 42
src/Symfony/Component/ClassLoader/ClassLoaderInterface.php

@@ -1,42 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ClassLoader;
-
-/**
- * ClassLoaderInterface.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @api
- */
-interface ClassLoaderInterface
-{
-    /**
-     * Loads the given class or interface.
-     *
-     * @param string $class The name of the class
-     *
-     * @api
-     */
-    function loadClass($class);
-
-    /**
-     * Finds the path to the file where the class is defined.
-     *
-     * @param string $class The name of the class
-     *
-     * @return string|null The path, if found
-     *
-     * @api
-     */
-    function findFile($class);
-}

+ 1 - 3
src/Symfony/Component/ClassLoader/MapFileClassLoader.php

@@ -11,8 +11,6 @@
 
 namespace Symfony\Component\ClassLoader;
 
-require_once __DIR__.'/ClassLoaderInterface.php';
-
 /**
  * A class loader that uses a mapping file to look up paths.
  *
@@ -20,7 +18,7 @@ require_once __DIR__.'/ClassLoaderInterface.php';
  *
  * @api
  */
-class MapFileClassLoader implements ClassLoaderInterface
+class MapFileClassLoader
 {
     private $map = array();
 

+ 1 - 3
src/Symfony/Component/ClassLoader/UniversalClassLoader.php

@@ -11,8 +11,6 @@
 
 namespace Symfony\Component\ClassLoader;
 
-require_once __DIR__.'/ClassLoaderInterface.php';
-
 /**
  * UniversalClassLoader implements a "universal" autoloader for PHP 5.3.
  *
@@ -56,7 +54,7 @@ require_once __DIR__.'/ClassLoaderInterface.php';
  *
  * @api
  */
-class UniversalClassLoader implements ClassLoaderInterface
+class UniversalClassLoader
 {
     private $namespaces = array();
     private $prefixes = array();