Propel API
Class

PropelAutoloader

class PropelAutoloader

Simple autoloader for Propel generated model classes.

This class implements the singleton pattern.

Methods

static PropelAutoloader getInstance()

Retrieves the singleton instance of this class.

static void register()

Register PropelAutoloader in spl autoloader.

static void unregister()

Unregister PropelAutoloader from spl autoloader.

addClassPaths(array $classMap)

Sets the path for a list of classes.

addClassPath(string $class, string $path)

Sets the path for a particular class.

string|null getClassPath(string $class)

Returns the path where a particular class can be found.

boolean autoload(string $class)

Handles autoloading of classes that have been registered in this instance

Details

at line 32
static public PropelAutoloader getInstance()

Retrieves the singleton instance of this class.

Return Value

PropelAutoloader A PropelAutoloader instance.

at line 46
static public void register()

Register PropelAutoloader in spl autoloader.

Return Value

void

at line 60
static public void unregister()

Unregister PropelAutoloader from spl autoloader.

Return Value

void

at line 70
public addClassPaths(array $classMap)

Sets the path for a list of classes.

Parameters

array $classMap An associative array $className => $classPath

at line 81
public addClassPath(string $class, string $path)

Sets the path for a particular class.

Parameters

string $class A PHP class name
string $path A path (absolute or relative to the include path)

at line 93
public string|null getClassPath(string $class)

Returns the path where a particular class can be found.

Parameters

string $class A PHP class name

Return Value

string|null A path (absolute or relative to the include path)

at line 105
public boolean autoload(string $class)

Handles autoloading of classes that have been registered in this instance

Parameters

string $class A class name.

Return Value

boolean Returns true if the class has been loaded