Class Psr0ClassLoader
SplClassLoader implementation that implements the technical interoperability standards for PHP 5.3 namespaces and class names.
From the PHP Framework Interop Group
Examples
Package: Xoops
Category: Xoops\Core\Psr0ClassLoader
Author: Jonathan H. Wage jonwage@gmail.com
Author: Roman S. Borschel roman@code-factory.org
Author: Matthew Weier O'Phinney matthew@zend.com
Author: Kris Wallsmith kris.wallsmith@gmail.com
Author: Fabien Potencier fabien.potencier@symfony-project.org
Author: Richard Griffith richard@geekwright.com
See: http://www.php-fig.org/
Link: https://gist.github.com/jwage/221634
Code:
$myLibLoader = new SplClassLoader('mylib', '/path/to/mylib/src'); $myLibLoader->register();
$zendLoader = new SplClassLoader('Zend', '/path/to/zend/lib');
$zendLoader->setNamespaceSeparator('_');
$zendLoader->register();
Endcode
Located at oops_lib/Xoops/Core/Psr0ClassLoader.php
public
|
#
__construct( string $ns = null, string $includePath = null )
Creates a new SplClassLoader that loads classes of the specified namespace. |
public static
SplClassLoader
|
|
public
|
#
setNamespaceSeparator( string $sep )
Sets the namespace separator used by classes in the namespace of this class loader. |
public
string
|
#
getNamespaceSeparator( )
Gets the namespace seperator used by classes in the namespace of this class loader. |
public
|
#
setIncludePath( string $includePath )
Sets the base include path for all class files in the namespace of this class loader. |
public
string
|
#
getIncludePath( )
Gets the base include path for all class files in the namespace of this class loader. |
public
|
#
setFileExtension( string $fileExtension )
Sets the file extension of class files in the namespace of this class loader. |
public
string
|
|
public
|
|
public
|
|
public
|