public static function isAvailable() { return extension_loaded('curl'); }
public static function getProvider() { if (Curl::isAvailable()) { return new Curl(); } if (Stream::isAvailable()) { return new Stream(); } throw new ProviderException("There isn't any available provider"); }