Ctct\SplClassLoader
SplClassLoader implementation that implements the technical interoperability standards for PHP 5.3 namespaces and class names.
http://groups.google.com/group/php-standards/web/final-proposal
// Example which loads classes for the Doctrine Common package in the
// Doctrine\Common namespace.
$classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine');
$classLoader->register();
- Author: Jonathan H. Wage <jonwage@gmail.com>
Synopsis
class SplClassLoader
{
- // members
- private string $fileExtension = '.php';
- private $namespace;
- private $includePath;
- private string $namespaceSeparator = '\\';
- // methods
- public void __construct()
- public void setNamespaceSeparator()
- public void getNamespaceSeparator()
- public void setIncludePath()
- public string getIncludePath()
- public void setFileExtension()
- public string getFileExtension()
- public void register()
- public void unregister()
- public void loadClass()
Members
private
- $fileExtension
- $includePath
- $namespace
- $namespaceSeparator
Methods
public
- __construct() — Creates a new <tt>SplClassLoader</tt> that loads classes of the specified namespace.
- getFileExtension() — Gets the file extension of class files in the namespace of this class loader.
- getIncludePath() — Gets the base include path for all class files in the namespace of this class loader.
- getNamespaceSeparator() — Gets the namespace seperator used by classes in the namespace of this class loader.
- loadClass() — Loads the given class or interface.
- register() — Installs this class loader on the SPL autoload stack.
- setFileExtension() — Sets the file extension of class files in the namespace of this class loader.
- setIncludePath() — Sets the base include path for all class files in the namespace of this class loader.
- setNamespaceSeparator() — Sets the namespace separator used by classes in the namespace of this class loader.
- unregister() — Uninstalls this class loader from the SPL autoloader stack.