Ejemplo n.º 1
0
function __autoload($interface_or_class_name)
{
    try {
        $classloader = ClassLoader::instance();
        if ($classloader->has_found_class($interface_or_class_name)) {
            $classloader->load($interface_or_class_name);
        } else {
            if (InterfaceLoader::instance()->has_found_interface($interface_or_class_name)) {
                InterfaceLoader::instance()->load($interface_or_class_name);
            }
        }
    } catch (Exception $ex) {
        echo $ex->getMessage();
    }
}
Ejemplo n.º 2
0
 private static function init()
 {
     self::$instance = new InterfaceLoader(self::INTERFACE_FILENAME_SUFFIX, true, false);
     self::$instance->autoconfigure();
 }