PHP Класс sfAutoload

This class is a singleton as PHP seems to be unable to register 2 autoloaders that are instances of the same class (why?).
Автор: Fabien Potencier ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$classes
$freshCache
$instance
$overriden

Открытые методы

Метод Описание
autoload ( string $class ) : boolean Handles autoloading of classes that have been specified in autoload.yml.
getClassPath ( string $class ) : string | null Returns the path where a particular class can be found.
getInstance ( ) : sfCoreAutoload Retrieves the singleton instance of this class.
loadClass ( string $class ) : boolean Tries to load a class that has been specified in autoload.yml.
register ( ) : void Register sfAutoload in spl autoloader.
reloadClasses ( boolean $force = false ) : boolean Reloads the autoloader.
setClassPath ( string $class, string $path ) Sets the path for a particular class.
unregister ( ) : void Unregister sfAutoload from spl autoloader.

Защищенные методы

Метод Описание
__construct ( )

Описание методов

__construct() защищенный Метод

protected __construct ( )

autoload() публичный Метод

Handles autoloading of classes that have been specified in autoload.yml.
public autoload ( string $class ) : boolean
$class string A class name.
Результат boolean Returns true if the class has been loaded

getClassPath() публичный Метод

Returns the path where a particular class can be found.
public getClassPath ( string $class ) : string | null
$class string A PHP class name
Результат string | null An absolute path

getInstance() публичный статический Метод

Retrieves the singleton instance of this class.
public static getInstance ( ) : sfCoreAutoload
Результат sfCoreAutoload A sfCoreAutoload implementation instance.

loadClass() публичный Метод

Tries to load a class that has been specified in autoload.yml.
public loadClass ( string $class ) : boolean
$class string A class name.
Результат boolean Returns true if the class has been loaded

register() публичный статический Метод

Register sfAutoload in spl autoloader.
public static register ( ) : void
Результат void

reloadClasses() публичный Метод

Reloads the autoloader.
public reloadClasses ( boolean $force = false ) : boolean
$force boolean Whether to force a reload
Результат boolean True if the reload was successful, otherwise false

setClassPath() публичный Метод

Sets the path for a particular class.
public setClassPath ( string $class, string $path )
$class string A PHP class name
$path string An absolute path

unregister() публичный статический Метод

Unregister sfAutoload from spl autoloader.
public static unregister ( ) : void
Результат void

Описание свойств

$classes защищенное свойство

protected $classes

$freshCache защищенное статическое свойство

protected static $freshCache

$instance защищенное статическое свойство

protected static $instance

$overriden защищенное свойство

protected $overriden