Methods

The main __autoload() implementation.

autoload(string $className) : void

Tries to include the file of passed classname.

Parameters

$className

string

The classname

Exceptions

\Exception If autoloader wasn't initialized before

Returns the errorlist containing invalid classes (@see Contenido_Autoload::$_errors)

getErrors() : array

Returns

array

Returns the loaded classes (@see Contenido_Autoload::$_loadedClasses)

getLoadedClasses() : array

Returns

array

Initialization of Contenido autoloader, is to call at least once.

initialize(array $cfg) : void

Registers itself as a __autoload implementation, includes the classmap file, and if exists, the user defined class map file, containing the includes.

Parameters

$cfg

array

The Contenido cfg array

Checks, if passed filename is a file, which will be included by the autoloader.

isAutoloadable(string $file) : bool

Parameters

$file

string

Filename or Filename with a part of the path, e. g. - class.foobar.php - classes/class.foobar.php - contenido/classes/class.foobar.php

Returns

bool

Returns the path to a Contenido class file by processing the given classname

_getContenidoClassFile(string $className) : \(string | \null)

Parameters

$className

string

Returns

\(string\null)Path and filename or null

Loads the desired file by invoking require_once method

_loadFile(string $filePathName, bool $beQuiet) : void

Parameters

$filePathName

string

$beQuiet

bool

Flag to prevent thrown warnings/errors by using the error control operator @

Validates the given class and the file

_validateClassAndFile(string $className, string $filePathName) : \(string | \null)

Parameters

$className

string

$filePathName

string

Returns

\(string\null)The file if validation was successfull, otherwhise null

 Properties

 

Contenido root path. Path to the folder which contains the Contenido installation.

$_conRootPath : string

 

Array to store invalid classnames and the paths to the class files.

$_errors : array

$_errors[pos] = array('class' => classname, 'file' => file, 'error' => errorType);

 

Array of interface/class names with related files to include

$_includeFiles : array

 

Flag containing initialized status

$_initialized : bool

 

Array to store loaded classnames and the paths to the class files.

$_loadedClasses : array

$_loadedClasses['classname'] = '/path/to/the/class.php';

 Constants

 

ERROR_CLASS_EXISTS

ERROR_CLASS_EXISTS 

 

ERROR_FILE_NOT_FOUND

ERROR_FILE_NOT_FOUND