Added the Porter Stemmer module to improve searches. This doesn't deal with some...
[yaffs-website] / vendor / symfony / class-loader / ClassLoader.php
index a506dc094194664a940cf6c6befadf4a1899d767..52cff3bb4c5f456c7c4fb1f684ef8b8c980a8783 100644 (file)
@@ -11,6 +11,8 @@
 
 namespace Symfony\Component\ClassLoader;
 
+@trigger_error('The '.__NAMESPACE__.'\ClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use Composer instead.', E_USER_DEPRECATED);
+
 /**
  * ClassLoader implements an PSR-0 class loader.
  *
@@ -36,6 +38,8 @@ namespace Symfony\Component\ClassLoader;
  *
  * @author Fabien Potencier <fabien@symfony.com>
  * @author Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
  */
 class ClassLoader
 {
@@ -91,12 +95,12 @@ class ClassLoader
             return;
         }
         if (isset($this->prefixes[$prefix])) {
-            if (is_array($paths)) {
+            if (\is_array($paths)) {
                 $this->prefixes[$prefix] = array_unique(array_merge(
                     $this->prefixes[$prefix],
                     $paths
                 ));
-            } elseif (!in_array($paths, $this->prefixes[$prefix])) {
+            } elseif (!\in_array($paths, $this->prefixes[$prefix])) {
                 $this->prefixes[$prefix][] = $paths;
             }
         } else {
@@ -170,7 +174,7 @@ class ClassLoader
     {
         if (false !== $pos = strrpos($class, '\\')) {
             // namespaced class name
-            $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
+            $classPath = str_replace('\\', \DIRECTORY_SEPARATOR, substr($class, 0, $pos)).\DIRECTORY_SEPARATOR;
             $className = substr($class, $pos + 1);
         } else {
             // PEAR-like class name
@@ -178,21 +182,21 @@ class ClassLoader
             $className = $class;
         }
 
-        $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
+        $classPath .= str_replace('_', \DIRECTORY_SEPARATOR, $className).'.php';
 
         foreach ($this->prefixes as $prefix => $dirs) {
             if ($class === strstr($class, $prefix)) {
                 foreach ($dirs as $dir) {
-                    if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
-                        return $dir.DIRECTORY_SEPARATOR.$classPath;
+                    if (file_exists($dir.\DIRECTORY_SEPARATOR.$classPath)) {
+                        return $dir.\DIRECTORY_SEPARATOR.$classPath;
                     }
                 }
             }
         }
 
         foreach ($this->fallbackDirs as $dir) {
-            if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
-                return $dir.DIRECTORY_SEPARATOR.$classPath;
+            if (file_exists($dir.\DIRECTORY_SEPARATOR.$classPath)) {
+                return $dir.\DIRECTORY_SEPARATOR.$classPath;
             }
         }