public function ClassLoader::loadClass

Same name in this branch
  1. 9.x drupal/core/vendor/composer/ClassLoader.php \Composer\Autoload\ClassLoader::loadClass()
  2. 9.x drupal/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php \Doctrine\Common\ClassLoader::loadClass()
  3. 9.x drupal/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php \Symfony\Component\ClassLoader\ClassLoader::loadClass()

Loads the given class or interface.

Parameters

string $class The name of the class:

Return value

bool|null True, if loaded

File

drupal/core/vendor/composer/ClassLoader.php, line 147

Class

ClassLoader
ClassLoader implements a PSR-0 class loader

Namespace

Composer\Autoload

Code

public function loadClass($class) {
  if ($file = $this
    ->findFile($class)) {
    include $file;
    return true;
  }
}