Class AutoLoader
Auto loads classes via the PHP autoload handle Works through the cache
manager to prevent directory scanning for the same thing time and time again
Methods summary
public
|
|
public
|
#
addScannedDirectory( String $directory, String $namespace = 'default' )
Add a directory to the class auto load scanner for a particular namespace
Add a directory to the class auto load scanner for a particular namespace
Parameters
- $directory
String The directory to scan
- $namespace
String The namespace (optional, if your class is in the default namespace leave this
blank)
|
protected
|
#
autoLoad( String $className )
Internal method for loading classes, used by spl_autoload_register
Internal method for loading classes, used by spl_autoload_register
This method will trigger php error on failure instead of throwing exceptions
as exceptions are caught internally by the php auto loader
Parameters
- $className
String the name of the class to load, including the namespace e.g.
picon\RequestProcessor
|
protected
|
#
onFail( type $namespace, type $class )
Called when the auto loader fails to load the requested class
Called when the auto loader fails to load the requested class
Parameters
- $namespace
type
- $class
type
|
public
|
|