Go to the source code of this file.
Functions | |
| __autoload ($classname) | |
| __load_class ($classname, $dir) | |
Definition in file autoload.inc.
| __autoload | ( | $ | classname | ) |
Class loader for SPL example classes.
Definition at line 34 of file autoload.inc.
References $dir, and __load_class().
00034 { 00035 $classname = strtolower($classname); 00036 $inc = split(':', ini_get('include_path')); 00037 $inc[] = '.'; 00038 $inc[] = dirname($_SERVER['PATH_TRANSLATED']); 00039 foreach($inc as $dir) 00040 { 00041 if (__load_class($classname, $dir)) 00042 { 00043 fprintf(STDERR, 'Loading class('.$classname.")\n"); 00044 return; 00045 } 00046 } 00047 fprintf(STDERR, 'Class not found ('.$classname.")\n"); 00048 }
Here is the call graph for this function:

| __load_class | ( | $ | classname, | |
| $ | dir | |||
| ) |
For internal use only.
Tries to load class $classname from directory $dir.
Definition at line 15 of file autoload.inc.
References $dir.
Referenced by __autoload().
00016 { 00017 $file = $dir . '/' . $classname . '.inc'; 00018 if (file_exists($file)) 00019 { 00020 require_once($file); 00021 return true; 00022 } 00023 return false; 00024 }
1.5.2