Asks this ClassLoader whether it can potentially load the class (file) with the given name.
string $className The fully-qualified name of the class.:
boolean TRUE if this ClassLoader can load the class, FALSE otherwise.
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 file_exists($this->includePath . DIRECTORY_SEPARATOR . $file);
}
return false !== stream_resolve_include_path($file);
}