/** * Autoload class * * @param string $modelName Class model name * @return boolean True on success * @access public */ function autoLoadClass($modelName) { $path = MAX_PATH . '/lib/max/Dal/Admin/' . $modelName . '.php'; if (!file_exists($path)) { PEAR::raiseError("autoload:File doesn't exist {$path}"); return false; } include_once $path; $class = MAX_Dal_Common::getClassName($modelName); if (!class_exists($class)) { PEAR::raiseError("autoload:Could not autoload {$class}"); return false; } return $class; }