public static function Autoloader::resolveFile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php \Doctrine\Common\Proxy\Autoloader::resolveFile()
Resolves proxy class name to a filename based on the following pattern.
1. Remove Proxy namespace from class name. 2. Remove namespace separators from remaining class name. 3. Return PHP filename from proxy-dir with the result from 2.
Parameters
string $proxyDir:
string $proxyNamespace:
string $className:
Return value
string
Throws
2 calls to Autoloader::resolveFile()
- Autoloader::register in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ Autoloader.php - Registers and returns autoloader callback for the given proxy dir and namespace.
- AutoloaderTest::testResolveFile in vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Proxy/ AutoloaderTest.php - @dataProvider dataResolveFile
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Proxy/ Autoloader.php, line 46
Class
- Autoloader
- Special Autoloader for Proxy classes, which are not PSR-0 compliant.
Namespace
Doctrine\Common\ProxyCode
public static function resolveFile($proxyDir, $proxyNamespace, $className) {
if (0 !== strpos($className, $proxyNamespace)) {
throw InvalidArgumentException::notProxyClass($className, $proxyNamespace);
}
$className = str_replace('\\', '', substr($className, strlen($proxyNamespace) + 1));
return $proxyDir . DIRECTORY_SEPARATOR . $className . '.php';
}