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])
Afficher le fichier Open project: lexpress/symfony1 Class Usage Examples

Protected Properties

Свойство Type Description
$baseDir
$classes To update it, use sfCoreAutoload::make()
$instance
$registered

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
__construct ( )

Method Details

__construct() protected méthode

protected __construct ( )

autoload() public méthode

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

getBaseDir() public méthode

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

getClassPath() public méthode

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

getInstance() public static méthode

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

make() public static méthode

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

register() public static méthode

Register sfCoreAutoload in spl autoloader.
public static register ( ) : void
Résultat void

unregister() public static méthode

Unregister sfCoreAutoload from spl autoloader.
public static unregister ( ) : void
Résultat 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