PHP Class Mutagenesis\Loader

Datei anzeigen Open project: padraic/mutagenesis Class Usage Examples

Public Methods

Method Description
__construct ( string $ns = 'Mutagenesis', $includePath = null ) Creates a new Loader that loads classes of the specified namespace.
getFileExtension ( ) : string Gets the file extension of class files in the namespace of this class loader.
getIncludePath ( ) : string Gets the base include path for all class files in the namespace of this class loader.
getNamespaceSeparator ( ) : void Gets the namespace seperator used by classes in the namespace of this class loader.
loadClass ( string $className ) : void Loads the given class or interface.
register ( ) Installs this class loader on the SPL autoload stack.
setFileExtension ( string $fileExtension ) Sets the file extension of class files in the namespace of this class loader.
setIncludePath ( string $includePath ) Sets the base include path for all class files in the namespace of this class loader.
setNamespaceSeparator ( string $sep ) Sets the namespace separator used by classes in the namespace of this class loader.
unregister ( ) Uninstalls this class loader from the SPL autoloader stack.

Method Details

__construct() public method

Creates a new Loader that loads classes of the specified namespace.
public __construct ( string $ns = 'Mutagenesis', $includePath = null )
$ns string The namespace to use.

getFileExtension() public method

Gets the file extension of class files in the namespace of this class loader.
public getFileExtension ( ) : string
return string $fileExtension

getIncludePath() public method

Gets the base include path for all class files in the namespace of this class loader.
public getIncludePath ( ) : string
return string $includePath

getNamespaceSeparator() public method

Gets the namespace seperator used by classes in the namespace of this class loader.
public getNamespaceSeparator ( ) : void
return void

loadClass() public method

Loads the given class or interface.
public loadClass ( string $className ) : void
$className string The name of the class to load.
return void

register() public method

Installs this class loader on the SPL autoload stack.
public register ( )

setFileExtension() public method

Sets the file extension of class files in the namespace of this class loader.
public setFileExtension ( string $fileExtension )
$fileExtension string

setIncludePath() public method

Sets the base include path for all class files in the namespace of this class loader.
public setIncludePath ( string $includePath )
$includePath string

setNamespaceSeparator() public method

Sets the namespace separator used by classes in the namespace of this class loader.
public setNamespaceSeparator ( string $sep )
$sep string The separator to use.

unregister() public method

Uninstalls this class loader from the SPL autoloader stack.
public unregister ( )