X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fclass-loader%2FClassLoader.php;h=52cff3bb4c5f456c7c4fb1f684ef8b8c980a8783;hb=refs%2Fheads%2Fmaster;hp=4afcf405854dfe2c7352c64ca19c4942937ec620;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/vendor/symfony/class-loader/ClassLoader.php b/vendor/symfony/class-loader/ClassLoader.php index 4afcf4058..52cff3bb4 100644 --- a/vendor/symfony/class-loader/ClassLoader.php +++ b/vendor/symfony/class-loader/ClassLoader.php @@ -95,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 { @@ -174,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 @@ -182,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; } }