Methods

__construct()

__construct($http_method, $http_url, $parameters = NULL

Parameters

$http_method

$http_url

$parameters

__toString()

__toString() 

build_signature()

build_signature($signature_method, $consumer, $token) 

Parameters

$signature_method

$consumer

$token

pretty much a helper function to set up the request

from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters = NULL
Static

Parameters

$consumer

$token

$http_method

$http_url

$parameters

attempt to build up a request from what was passed to the server

from_request($http_method = NULL, $http_url = NULL, $parameters = NULL
Static

Parameters

$http_method

$http_url

$parameters

just uppercases the http method

get_normalized_http_method() 

parses the url and rebuilds it to be scheme://host/path

get_normalized_http_url() 

get_parameter()

get_parameter($name) 

Parameters

$name

get_parameters()

get_parameters() 

The request parameters, sorted and concatenated into a normalized string.

get_signable_parameters() : string

Returns

string

Returns the base string of this request

get_signature_base_string() 
The base string defined as the method, the url and the parameters (normalized), each urlencoded and the concated with &.

set_parameter()

set_parameter($name, $value, $allow_duplicates = true

Parameters

$name

$value

$allow_duplicates

sign_request()

sign_request($signature_method, $consumer, $token) 

Parameters

$signature_method

$consumer

$token

builds the Authorization: header

to_header($realm = null

Parameters

$realm

builds the data one would send in a POST request

to_postdata() 

builds a url usable for a GET request

to_url() 

unset_parameter()

unset_parameter($name) 

Parameters

$name

util function: current nonce

generate_nonce() 
Static

util function: current timestamp

generate_timestamp() 
Static

 Properties

 

$POST_INPUT

$POST_INPUT 

Default

'php://input'
Static
 

$base_string

$base_string 

Default

 

$version

$version 

Default

'1.0'
Static
 

$http_method

$http_method 

Default

 

$http_url

$http_url 

Default

 

$parameters

$parameters 

Default