Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AnnotationRegistry.php

function AnnotationRegistry::loadAnnotationClass

Autoloads an annotation class silently.

2 calls to AnnotationRegistry::loadAnnotationClass()
DocParser::classExists in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
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.
DocParser::classExists in core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php
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.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php, line 25

Class

AnnotationRegistry

Namespace

Doctrine\Common\Annotations

Code

public static function loadAnnotationClass(string $class) : bool {
    if (class_exists($class, false)) {
        return true;
    }
    if (array_key_exists($class, self::$failedToAutoload)) {
        return false;
    }
    if (class_exists($class)) {
        return true;
    }
    self::$failedToAutoload[$class] = null;
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal