private function DocParser::classExists in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::classExists()
Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism but uses the {@link AnnotationRegistry} to load classes.
Parameters
string $fqcn:
Return value
boolean
1 call to DocParser::classExists()
- DocParser::Annotation in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php - Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…
File
- core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php, line 439 - This class is a near-copy of Doctrine\Common\Annotations\DocParser, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.
Class
- DocParser
- A parser for docblock annotations.
Namespace
Drupal\Component\Annotation\DoctrineCode
private function classExists($fqcn) {
if (isset($this->classExists[$fqcn])) {
return $this->classExists[$fqcn];
}
// first check if the class already exists, maybe loaded through another AnnotationReader
if (class_exists($fqcn, false)) {
return $this->classExists[$fqcn] = true;
}
// final check, does this class exist?
return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn);
}