urlencode a value
static string
urlEncode
(string $value)
Assemble all parameters for a generic OAuth request - i.e. no special params other than the defaults expected for any OAuth query.
Generate nonce
string
generateNonce
()
Generate timestamp
int
generateTimestamp
()
Parse query string
array
parseQueryString
(mixed $query)
Sign request
string
sign
( $params, string $signatureMethod, string $consumerSecret, [null|string $tokenSecret = null], [null|string $method = null], [null|string $url = null])
-
array
$params
-
string
$signatureMethod
-
string
$consumerSecret
-
null|string
$tokenSecret
-
null|string
$method
-
null|string
$url
Cast to authorization header
void
toAuthorizationHeader
( $params, [null|string $realm = null], [bool $excludeCustomParams = true])
-
array
$params
-
null|string
$realm
-
bool
$excludeCustomParams
Given both OAuth parameters and any custom parametere, generate an encoded query string. This method expects parameters to have been assembled and signed beforehand.
string
toEncodedQueryString
( $params, [bool $customParamsOnly = false])
-
array
$params
-
bool
$customParamsOnly: Ignores OAuth params e.g. for requests using OAuth Header