PHP Class ClassLoader, ClearSky

Author: aipa
Afficher le fichier Open project: robske110/ClearSky Class Usage Examples

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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

addPath() public méthode

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

findClass() public méthode

Returns the path for the class, if any
public findClass ( string $name ) : string | null
$name string
Résultat string | null

getClasses() public méthode

Returns an array of the classes loaded
public getClasses ( ) : string[]
Résultat string[]

getParent() public méthode

Returns the parent ClassLoader, if any
public getParent ( ) : ClassLoader
Résultat ClassLoader

loadClass() public méthode

Called when there is a class to load
public loadClass ( string $name ) : boolean
$name string
Résultat boolean

register() public méthode

Attaches the ClassLoader to the PHP runtime
public register ( boolean $prepend = false ) : boolean
$prepend boolean
Résultat boolean

removePath() public méthode

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