public static function autoload($class)
    {
        if (0 === strpos($class, 'Bitpay\\')) {
            $classname = substr($class, 7);

            $file = __DIR__.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $classname).'.php';

            if (is_file($file) && is_readable($file)) {
                require_once $file;

                return true;
            }

            throw new \Exception(sprintf('Class "%s" Not Found', $class));
        }
    }
public static function autoload($class)
    {
        if (0 === strpos($class, 'Bitpay\\')) {
            $classname = substr($class, 7);

            $file = __DIR__.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $classname).'.php';

            if (is_file($file) && is_readable($file)) {
                require_once $file;

                return true;
            }

            throw new \Exception(sprintf('Class "%s" Not Found', $class));
        }
    }
public static function autoload ( $ class ) { if ( 0 === strpos ( $ class , 'Bitpay\\' ) ) { $ classname = substr ( $ class , 7 ) ; $ file = __DIR__ . DIRECTORY_SEPARATOR . str_replace ( '\\' , DIRECTORY_SEPARATOR , $ classname ) . '.php' ; if ( is_file ( $ file ) && is_readable ( $ file ) ) { require_once $ file ; return true ; } throw new \ Exception ( sprintf ( 'Class "%s" Not Found' , $ class ) ) ; } }
Give a class name and it will require the file.

@param  string $class
@return bool
Give a class name and it will require the file .