Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
AutoLoader Class Reference

Static Public Member Functions

static registerDirectory ($dirName)
 Store the filename (sans extension) & full path of all ".php" files found.
static registerClass ($className, $fileName)
static loadClass ($className)

Static Private Attributes

static $classNames = array()

Detailed Description

Definition at line 2 of file AutoLoader.php.

Member Function Documentation

static loadClass (   $className)

Definition at line 29 of file AutoLoader.php.

References $classNames, and isset.

if (isset(AutoLoader::$classNames[$className])) {
static registerClass (   $className,

Definition at line 25 of file AutoLoader.php.

References $classNames.

Referenced by registerDirectory().

AutoLoader::$classNames[$className] = $fileName;
static registerDirectory (   $dirName)

Store the filename (sans extension) & full path of all ".php" files found.

Definition at line 9 of file AutoLoader.php.

References registerClass().

$di = new DirectoryIterator($dirName);
foreach ($di as $file) {
if ($file->isDir() && !$file->isLink() && !$file->isDot()) {
// recurse into directories other than a few special ones
} elseif (substr($file->getFilename(), -4) === '.php') {
// save the class name / path of a .php file found
$className = substr($file->getFilename(), 0, -4);
AutoLoader::registerClass($className, $file->getPathname());

Field Documentation

$classNames = array()

Definition at line 4 of file AutoLoader.php.

Referenced by loadClass(), and registerClass().

The documentation for this class was generated from the following file: