public function Psr4ClassLoader::findFile in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/class-loader/Psr4ClassLoader.php \Symfony\Component\ClassLoader\Psr4ClassLoader::findFile()
Parameters
string $class:
Return value
string|null
1 call to Psr4ClassLoader::findFile()
- Psr4ClassLoader::loadClass in vendor/
symfony/ class-loader/ Psr4ClassLoader.php
File
- vendor/
symfony/ class-loader/ Psr4ClassLoader.php, line 44
Class
- Psr4ClassLoader
- A PSR-4 compatible class loader.
Namespace
Symfony\Component\ClassLoaderCode
public function findFile($class) {
$class = ltrim($class, '\\');
foreach ($this->prefixes as $current) {
list($currentPrefix, $currentBaseDir) = $current;
if (0 === strpos($class, $currentPrefix)) {
$classWithoutPrefix = substr($class, strlen($currentPrefix));
$file = $currentBaseDir . str_replace('\\', DIRECTORY_SEPARATOR, $classWithoutPrefix) . '.php';
if (file_exists($file)) {
return $file;
}
}
}
}