Class to provide OAuth utility methods. More...
Static Public Member Functions | |
static array string | urlencode_rfc3986 (mixed $input) |
URL encode. | |
static string | urldecode_rfc3986 (string $string) |
URL decode. | |
static array | split_header (string $header, bool $only_allow_oauth_parameters=true) |
Utility function for turning the Authorization: header into parameters, has to do some unescaping. | |
static array | get_headers () |
Helper to try to sort out headers for people who aren't running apache. | |
static array | parse_parameters (?string $input) |
Parse parameters. | |
static string | build_http_query (?array $params) |
Build HTTP query string. | |
static array | array_merge_recursive (array $array1, array $array2) |
Recursively merge two arrays. | |
Class to provide OAuth utility methods.
|
static |
Recursively merge two arrays.
array | $array1 | First array |
array | $array2 | Second array |
Referenced by OAuthRequest\from_request().
|
static |
Build HTTP query string.
array | null | $params | Array of parameters |
Referenced by OAuthRequest\get_normalized_http_method().
|
static |
Helper to try to sort out headers for people who aren't running apache.
Referenced by OAuthRequest\from_request().
|
static |
Parse parameters.
This function takes a input like a=b&a=c&d=e and returns the parsed parameters like this ['a' => ['b','c'], 'd' => 'e']
string | null | $input | Parameter string to be parsed |
References OAuthUtil\urlencode_rfc3986().
Referenced by OAuthRequest\from_request().
|
static |
Utility function for turning the Authorization: header into parameters, has to do some unescaping.
Can filter out any non-oauth parameters if needed (default behaviour) May 28th, 2010 - method updated to tjerk.meesters for a speed improvement. see http://code.google.com/p/oauth/issues/detail?id=163
string | $header | Header value |
bool | $only_allow_oauth_parameters | True if only OAuth parameters are allowed |
Referenced by OAuthRequest\from_request().
|
static |
URL decode.
This decode function isn't taking into consideration the above modifications to the encoding process. However, this method doesn't seem to be used anywhere so leaving it as is.
string | $string | String to be decoded |
Referenced by OAuthUtil\urlencode_rfc3986().
|
static |
URL encode.
mixed | $input | Value to be encoded |
References OAuthUtil\urldecode_rfc3986().
Referenced by OAuthRequest\get_normalized_http_url(), and OAuthUtil\parse_parameters().