src/CarteBlanche/App/Loader.php
public static function classExists($classname, $autoload = true, $fail_error = false)
    {
        if (true===@class_exists($classname, false)) return true;
        if ($autoload) {
            try {
                if (true===class_exists($classname)) return true;
            } catch (\Exception $e) {
                if (true===$fail_error) throw $e;
            }
        }
        return false;
    }
public static function classExists($classname, $autoload = true, $fail_error = false)
    {
        if (true===@class_exists($classname, false)) return true;
        if ($autoload) {
            try {
                if (true===class_exists($classname)) return true;
            } catch (\Exception $e) {
                if (true===$fail_error) throw $e;
            }
        }
        return false;
    }
Application specific "class_exists()" function with silent SPL autoload

This will not throw exception or error if the class doesn't exist but return false

@param   string  $classname  The class name to test
@param   bool    $autoload
@param   bool    $fail_error
@return  bool    TRUE if the class exists
@throws  \Exception if the class was not found and `$fail_error = true`