public function ClassLoader::canLoadClass in Plug 7
Asks this ClassLoader whether it can potentially load the class (file) with the given name.
Parameters
string $className The fully-qualified name of the class.:
Return value
boolean TRUE if this ClassLoader can load the class, FALSE otherwise.
1 call to ClassLoader::canLoadClass()
- ClassLoader::loadClass in lib/
doctrine/ common/ lib/ Doctrine/ Common/ ClassLoader.php - Loads the given class or interface.
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ ClassLoader.php, line 201
Class
- ClassLoader
- A <tt>ClassLoader</tt> is an autoloader for class files that can be installed on the SPL autoload stack. It is a class loader that either loads only classes of a specific namespace or all namespaces and it is suitable for working…
Namespace
Doctrine\CommonCode
public function canLoadClass($className) {
if ($this->namespace !== null && strpos($className, $this->namespace . $this->namespaceSeparator) !== 0) {
return false;
}
$file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension;
if ($this->includePath !== null) {
return is_file($this->includePath . DIRECTORY_SEPARATOR . $file);
}
return false !== stream_resolve_include_path($file);
}