PHP Класс BaseClassLoader, ClearSky

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Наследование: extends Threaded, implements ClassLoader
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__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

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

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

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

__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

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

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