PHP Class sfCoreAutoload

This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances of the same class (why?).
Author: Fabien Potencier ([email protected])
Datei anzeigen Open project: lexpress/symfony1 Class Usage Examples

Protected Properties

Property Type Description
$baseDir
$classes To update it, use sfCoreAutoload::make()
$instance
$registered

Public Methods

Method Description
autoload ( string $class ) : boolean Handles autoloading of classes.
getBaseDir ( ) : string Returns the base directory this autoloader is working on.
getClassPath ( string $class ) : string | null Returns the filename of the supplied class.
getInstance ( ) : sfCoreAutoload Retrieves the singleton instance of this class.
make ( ) Rebuilds the association array between class names and paths.
register ( ) : void Register sfCoreAutoload in spl autoloader.
unregister ( ) : void Unregister sfCoreAutoload from spl autoloader.

Protected Methods

Method Description
__construct ( )

Method Details

__construct() protected method

protected __construct ( )

autoload() public method

Handles autoloading of classes.
public autoload ( string $class ) : boolean
$class string A class name.
return boolean Returns true if the class has been loaded

getBaseDir() public method

Returns the base directory this autoloader is working on.
public getBaseDir ( ) : string
return string The path to the symfony core lib directory

getClassPath() public method

Returns the filename of the supplied class.
public getClassPath ( string $class ) : string | null
$class string The class name (case insensitive)
return string | null An absolute path or null

getInstance() public static method

Retrieves the singleton instance of this class.
public static getInstance ( ) : sfCoreAutoload
return sfCoreAutoload A sfCoreAutoload implementation instance.

make() public static method

This method overrides this file (__FILE__)
public static make ( )

register() public static method

Register sfCoreAutoload in spl autoloader.
public static register ( ) : void
return void

unregister() public static method

Unregister sfCoreAutoload from spl autoloader.
public static unregister ( ) : void
return void

Property Details

$baseDir protected_oe property

protected $baseDir

$classes protected_oe property

To update it, use sfCoreAutoload::make()
protected $classes

$instance protected_oe static_oe property

protected static $instance

$registered protected_oe static_oe property

protected static $registered