本文整理汇总了PHP中OAuthUtil::decodeUrlEncodedArray方法的典型用法代码示例。如果您正苦于以下问题:PHP OAuthUtil::decodeUrlEncodedArray方法的具体用法?PHP OAuthUtil::decodeUrlEncodedArray怎么用?PHP OAuthUtil::decodeUrlEncodedArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OAuthUtil
的用法示例。
在下文中一共展示了OAuthUtil::decodeUrlEncodedArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseResponse
/**
* based on the content type different types are returned
* @param string $contentType
* @param mixed $data
* @return mixed
*/
private function parseResponse($data, $contentType)
{
switch (strtolower(trim($contentType))) {
case 'application/x-www-form-urlencoded':
return OAuthUtil::decodeUrlEncodedArray($data);
break;
case 'application/json':
return self::parseJSON($data);
break;
case 'application/xml':
return new SimpleXML($data);
break;
case 'application/xml+atom':
return new SimpleXML($data);
break;
case 'text/html':
/*
Fatal error: Uncaught exception 'MySpaceException' with message 'Requested --> http://api.myspace.com/v1/users/36452044/status.json Response:<br/><br/> <br/><br/> :: contentType ::\r\ntext/html :: status ::\r\n405 :: body ::\r\n :: headers ::\r\n{"statusCode":"405","statusDescription":null} ' in /home/.jamshid/user1056/demos.jdavid.net/myspaceid-sdkv03252009/source/MySpaceID/myspace.php:772 Stack trace: #0 /home/.jamshid/user1056/demos.jdavid.net/myspaceid-sdkv03252009/source/MySpaceID/myspace.php(380): MySpace->makeOAuthRequest('http://api.mysp...', NULL, 'PUT', Array, Array) #1 /home/.jamshid/user1056/demos.jdavid.net/myspaceid-sdkv03252009/samples/myspaceid-openid-oauth/finish_auth.php(58): MySpace->updateStatus(36452044) #2 /home/.jamshid/user1056/demos.jdavid.net/myspaceid-sdkv03252009/samples/myspaceid-openid-oauth/finish_auth.php(68): run() #3 {main} thrown in /home/.jamshid/user1056/demos.jdavid.net/myspaceid-sdkv03252009/source/MySpaceID/myspace.php on line 772
*/
return (string) $data;
break;
default:
//we do not know what type it is
return (string) $data;
//break;
}
}