PHP Класс ClassLoader, ClearSky

Автор: aipa
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( ClassLoader $parent = null )
addPath ( string $path, boolean $prepend = false ) Adds a path to the lookup list
findClass ( string $name ) : string | null Returns the path for the class, if any
getClasses ( ) : string[] Returns an array of the classes loaded
getParent ( ) : ClassLoader Returns the parent ClassLoader, if any
loadClass ( string $name ) : boolean Called when there is a class to load
register ( boolean $prepend = false ) : boolean Attaches the ClassLoader to the PHP runtime
removePath ( $path ) Removes a path from the lookup list

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

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

public __construct ( ClassLoader $parent = null )
$parent ClassLoader

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

Adds a path to the lookup list
public addPath ( string $path, boolean $prepend = false )
$path string
$prepend boolean

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

Returns the path for the class, if any
public findClass ( string $name ) : string | null
$name string
Результат string | null

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

Returns an array of the classes loaded
public getClasses ( ) : string[]
Результат string[]

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

Returns the parent ClassLoader, if any
public getParent ( ) : ClassLoader
Результат ClassLoader

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

Called when there is a class to load
public loadClass ( string $name ) : boolean
$name string
Результат boolean

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

Attaches the ClassLoader to the PHP runtime
public register ( boolean $prepend = false ) : boolean
$prepend boolean
Результат boolean

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

Removes a path from the lookup list
public removePath ( $path )
$path