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 together with other autoloaders in the SPL autoload stack.

If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader relies on the PHP <code>include_path</code>.

@author Roman Borschel <roman@code-factory.org> @since 2.0

Hierarchy

Expanded class hierarchy of ClassLoader

1 file declares its use of ClassLoader

File

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

Namespace

Doctrine\Common
View source

Members

Namesort descending Modifiers Type Description Overrides
ClassLoader::$fileExtension protected property
ClassLoader::$includePath protected property
ClassLoader::$namespace protected property
ClassLoader::$namespaceSeparator protected property
ClassLoader::canLoadClass public function Asks this ClassLoader whether it can potentially load the class (file) with the given name.
ClassLoader::classExists public static function Checks whether a class with a given name exists. A class "exists" if it is either already defined in the current request or if there is an autoloader on the SPL autoload stack that is a) responsible for the class in question and b) is able…
ClassLoader::getClassLoader public static function Gets the <tt>ClassLoader</tt> from the SPL autoload stack that is responsible for (and is able to load) the class with the given name.
ClassLoader::getFileExtension public function Gets the file extension of class files in the namespace of this ClassLoader.
ClassLoader::getIncludePath public function Gets the base include path for all class files in the namespace of this ClassLoader.
ClassLoader::getNamespaceSeparator public function Gets the namespace separator used by classes in the namespace of this ClassLoader.
ClassLoader::loadClass public function Loads the given class or interface.
ClassLoader::register public function Registers this ClassLoader on the SPL autoload stack.
ClassLoader::setFileExtension public function Sets the file extension of class files in the namespace of this ClassLoader.
ClassLoader::setIncludePath public function Sets the base include path for all class files in the namespace of this ClassLoader.
ClassLoader::setNamespaceSeparator public function Sets the namespace separator used by classes in the namespace of this ClassLoader.
ClassLoader::unregister public function Removes this ClassLoader from the SPL autoload stack.
ClassLoader::__construct public function Creates a new <tt>ClassLoader</tt> that loads classes of the specified namespace from the specified include path.