Esempio n. 1
0
 /**
  * @internal
  */
 private static function getClient()
 {
     if (!is_null(self::$client)) {
         return self::$client;
     }
     if (RippleRestClientCURL::isAvailable()) {
         return self::$client = new RippleRestClientCURL();
     }
     if (RippleRestClientURLFileOpen::isAvailable()) {
         return self::$client = new RippleRestClientURLFileOpen();
     }
     throw new RippleRestProtocolError("There is no Client available. Please try install cURL or turn on 'allow_url_fopen'.");
 }