You are here

private function DocParser::classExists in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\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 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php, line 435

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

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);
}