You are here

public function ClassLoader::__construct in Plug 7

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|null $ns The namespace of the classes to load.:

string|null $includePath The base include path to use.:

File

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

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