Class cAutoload
Implements autoload feature for a CONTENIDO project.
Autoloading for CONTENIDO is provided via a generated class map configuration file, which is available inside data/config/{environment}/ folder. - data/config/{environment}/config.autoloader.php
Autoloading is extendable by adding a additional class map file inside the same folder, which could contain further class map settings or could overwrite settings of main class map file. - data/config/{environment}/contenido/includes/config.autoloader.local.php
You can also add additional class map configuration by using function following functions: - cAutoload::addClassmapConfig(array $config) - cAutoload::addClassmapConfigFile($configFile)
Read also docs/techref/backend/backend.autoloader.html to get involved in CONTENIDO autoloader mechanism.
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc murat@purc.de
Located at classes/class.autoload.php
public static
|
|
public static
|
#
addClassmapConfig( array $config )
Adding additional autoloader class map configuration. NOTE: Since this autoloader is implemented for CONTENIDO, it doesn't support to load classfiles being located outside of the CONTENIDO installation folder. |
public static
|
#
addClassmapConfigFile( string $configFile )
Adding additional autoloader class map configuration file. NOTE: Since this autoloader is implemented for CONTENIDO, it doesn't support to load classfiles being located outside of the CONTENIDO installation folder. |
public static
|
|
public static
boolean
|
#
isAutoloadable( string $file )
Checks, if passed filename is a file, which will be included by the autoloader. |
public static
array
|
|
public static
array
|
|
private static
Ambigous
|
#
_getContenidoClassFile( string $className )
Returns the path to a CONTENIDO class file by processing the given classname |
private static
null
|
#
_validateClassAndFile( string $className, string $filePathName )
Validates the given class and the file |
private static
array
|
#
_normalizeConfig( array $config )
Normalizes the passed configuration array by returning a new copy of it which contains the keys in lowercase. This prevents errors by trying to load class 'foobar' if the real class name is 'FooBar'. |
private static
|
string |
ERROR_FILE_NOT_FOUND
Identifier for error if class file could not be found. |
#
'file_not_found'
|
string |
ERROR_CLASS_EXISTS
Identifier for error if class already exists. |
#
'class_exists'
|
private static
string
|
$_conRootPath
CONTENIDO root path. Path to the folder which contains the CONTENIDO installation. |
#
NULL
|
private static
array
|
$_includeFiles
Array of interface/class names with related files to include |
#
NULL
|
private static
boolean
|
$_initialized
Flag containing initialized status |
#
NULL
|
private static
array
|
$_loadedClasses
Array to store loaded classnames and the paths to the class files. $_loadedClasses['classname'] = '/path/to/the/class.php'; |
#
array()
|
private static
array
|
$_errors
Array to store invalid classnames and the paths to the class files. $_errors[pos] = array('class' => classname, 'file' => file, 'error' => errorType); |
#
array()
|