getHubs(); } /** * Allows the external environment to make Zend_Oauth use a specific * Client instance. * * @param Zend_Http_Client $httpClient * @return void */ public static function setHttpClient(Zend_Http_Client $httpClient) { self::$httpClient = $httpClient; } /** * Return the singleton instance of the HTTP Client. Note that * the instance is reset and cleared of previous parameters GET/POST. * Headers are NOT reset but handled by this component if applicable. * * @return Zend_Http_Client */ public static function getHttpClient() { if (!isset(self::$httpClient)): self::$httpClient = new Zend_Http_Client; else: self::$httpClient->resetParameters(); endif; return self::$httpClient; } /** * Simple mechanism to delete the entire singleton HTTP Client instance * which forces an new instantiation for subsequent requests. * * @return void */ public static function clearHttpClient() { self::$httpClient = null; } /** * RFC 3986 safe url encoding method * * @param string $string * @return string */ public static function urlencode($string) { $rawencoded = rawurlencode($string); $rfcencoded = str_replace('%7E', '~', $rawencoded); return $rfcencoded; } }