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
Expanded class hierarchy of ClassLoader
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClassLoader:: |
protected | property | ||
ClassLoader:: |
protected | property | ||
ClassLoader:: |
protected | property | ||
ClassLoader:: |
protected | property | ||
ClassLoader:: |
public | function | Asks this ClassLoader whether it can potentially load the class (file) with the given name. | |
ClassLoader:: |
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:: |
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:: |
public | function | Gets the file extension of class files in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Gets the base include path for all class files in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Gets the namespace separator used by classes in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Loads the given class or interface. | |
ClassLoader:: |
public | function | Registers this ClassLoader on the SPL autoload stack. | |
ClassLoader:: |
public | function | Sets the file extension of class files in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Sets the base include path for all class files in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Sets the namespace separator used by classes in the namespace of this ClassLoader. | |
ClassLoader:: |
public | function | Removes this ClassLoader from the SPL autoload stack. | |
ClassLoader:: |
public | function | Creates a new <tt>ClassLoader</tt> that loads classes of the specified namespace from the specified include path. |