public function ClassLoader::__construct

Creates a new <tt>ClassLoader</tt> that loads classes of the specified namespace from the specified include path.

If no include path is given, the ClassLoader relies on the PHP include_path. If neither a namespace nor an include path is given, the ClassLoader will be responsible for loading all classes, thereby relying on the PHP include_path.

Parameters

string $ns The namespace of the classes to load.:

string $includePath The base include path to use.:

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php, line 67

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 __construct($ns = null, $includePath = null) {
  $this->namespace = $ns;
  $this->includePath = $includePath;
}