Exemplo n.º 1
0
 function __autoload($class)
 {
     loadClass($class);
     if (class_exists($class) || interface_exists($class)) {
         return;
     }
     lowlevel_error("Class {$class} is not defined in included file");
 }
Exemplo n.º 2
0
 function __autoload($class)
 {
     if (!($fullpath = loadClass($class))) {
         lowlevel_error("Class is not defined and couldn't be loaded: {$class}. Consult documentation on __autoload()");
     }
     include_once $fullpath;
     if (class_exists($class) || interface_exists($class)) {
         return;
     }
     lowlevel_error("Class {$class} is not defined in included file");
 }