public static function loadClass($className, $includeFile = null)
    {
        if (class_exists($className, false) || interface_exists($className, false)) {
            return true;
        }

        if (empty($includeFile)) {
            $includeFile = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
        }
        // Do not silence the errors with @, parse errors will not be seen
        include $includeFile;

        // Still no class?
        if (!class_exists($className, false) && !interface_exists($className, false)) {
            if (!self::fileExists($includeFile)) {
                throw new HTML_QuickForm2_NotFoundException(
                    "File '$includeFile' was not found"
                );
            } else {
                throw new HTML_QuickForm2_NotFoundException(
                    "Class '$className' was not found within file '$includeFile'"
                );
            }
        }
    }
public static function loadClass($className, $includeFile = null)
    {
        if (class_exists($className, false) || interface_exists($className, false)) {
            return true;
        }

        if (empty($includeFile)) {
            $includeFile = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
        }
        // Do not silence the errors with @, parse errors will not be seen
        include $includeFile;

        // Still no class?
        if (!class_exists($className, false) && !interface_exists($className, false)) {
            if (!self::fileExists($includeFile)) {
                throw new HTML_QuickForm2_NotFoundException(
                    "File '$includeFile' was not found"
                );
            } else {
                throw new HTML_QuickForm2_NotFoundException(
                    "Class '$className' was not found within file '$includeFile'"
                );
            }
        }
    }
public static function loadClass ( $ className , $ includeFile = null ) { if ( class_exists ( $ className , false ) || interface_exists ( $ className , false ) ) { return true ; } if ( empty ( $ includeFile ) ) { $ includeFile = str_replace ( '_' , DIRECTORY_SEPARATOR , $ className ) . '.php' ; } // Do not silence the errors with @, parse errors will not be seen include $ includeFile ; // Still no class? if ( ! class_exists ( $ className , false ) && ! interface_exists ( $ className , false ) ) { if ( ! self :: fileExists ( $ includeFile ) ) { throw new HTML_QuickForm2_NotFoundException ( "File '$includeFile' was not found" ) ; } else { throw new HTML_QuickForm2_NotFoundException ( "Class '$className' was not found within file '$includeFile'" ) ; } } }
Tries to load a given class

If no $includeFile was provided, $className will be used with underscores
replaced with path separators and '.php' extension appended

@param    string  Class name to load
@param    string  Name of the file (supposedly) containing the given class
@throws   HTML_QuickForm2_NotFoundException   If the file either can't be
loaded or doesn't contain the given class
Tries to load a given class