You are here

public function ClassLoader::loadClass in Plug 7

Loads the given class or interface.

Parameters

string $className The name of the class to load.:

Return value

boolean TRUE if the class has been successfully loaded, FALSE otherwise.

File

lib/doctrine/common/lib/Doctrine/Common/ClassLoader.php, line 176

Class

ClassLoader
A <tt>ClassLoader</tt> is an autoloader for class files that can be installed on the SPL autoload stack. It is a class loader that either loads only classes of a specific namespace or all namespaces and it is suitable for working…

Namespace

Doctrine\Common

Code

public function loadClass($className) {
  if (self::typeExists($className)) {
    return true;
  }
  if (!$this
    ->canLoadClass($className)) {
    return false;
  }
  require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension;
  return self::typeExists($className);
}