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 {
{
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
$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;
}
}