Alternc  latest
Alternc logiel libre pour l'h├ębergement
 All Classes 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. More...
 
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 AutoLoader::loadClass (   $className)
static

Definition at line 33 of file AutoLoader.php.

References $classNames.

33  {
34  if (isset(AutoLoader::$classNames[$className])) {
35  require_once(AutoLoader::$classNames[$className]);
36  }
37  }
static $classNames
Definition: AutoLoader.php:4
static AutoLoader::registerClass (   $className,
  $fileName 
)
static
Parameters
string$className
string$fileName

Definition at line 29 of file AutoLoader.php.

References $classNames.

Referenced by registerDirectory().

29  {
30  AutoLoader::$classNames[$className] = $fileName;
31  }
static $classNames
Definition: AutoLoader.php:4
static AutoLoader::registerDirectory (   $dirName)
static

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

Definition at line 9 of file AutoLoader.php.

References elseif, and registerClass().

9  {
10 
11  $di = new DirectoryIterator($dirName);
12  foreach ($di as $file) {
13 
14  if ($file->isDir() && !$file->isLink() && !$file->isDot()) {
15  // recurse into directories other than a few special ones
16  self::registerDirectory($file->getPathname());
17  } elseif (substr($file->getFilename(), -4) === '.php') {
18  // save the class name / path of a .php file found
19  $className = substr($file->getFilename(), 0, -4);
20  AutoLoader::registerClass($className, $file->getPathname());
21  }
22  }
23  }
if(empty($site_name)) elseif($piwik->site_add($site_name, $site_urls))
static registerClass($className, $fileName)
Definition: AutoLoader.php:29

Member Data Documentation

AutoLoader::$classNames = array()
staticprivate

Definition at line 4 of file AutoLoader.php.

Referenced by loadClass(), and registerClass().


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