Moodle  2.2.1
http://www.collinsharper.com
OAuthRequest Class Reference

Public Member Functions

 __construct ($http_method, $http_url, $parameters=null)
 set_parameter ($name, $value, $allow_duplicates=true)
 get_parameter ($name)
 get_parameters ()
 unset_parameter ($name)
 get_signable_parameters ()
 get_signature_base_string ()
 get_normalized_http_method ()
 get_normalized_http_url ()
 to_url ()
 to_postdata ()
 to_header ()
 __toString ()
 sign_request ($signature_method, $consumer, $token)
 build_signature ($signature_method, $consumer, $token)

Static Public Member Functions

static from_request ($http_method=null, $http_url=null, $parameters=null)
static from_consumer_and_token ($consumer, $token, $http_method, $http_url, $parameters=null)

Data Fields

 $base_string

Static Public Attributes

static $version = '1.0'
static $POST_INPUT = 'php://input'

Detailed Description

Definition at line 235 of file OAuth.php.


Constructor & Destructor Documentation

__construct ( http_method,
http_url,
parameters = null 
)

Definition at line 244 of file OAuth.php.


Member Function Documentation

Definition at line 460 of file OAuth.php.

build_signature ( signature_method,
consumer,
token 
)

Definition at line 470 of file OAuth.php.

static from_consumer_and_token ( consumer,
token,
http_method,
http_url,
parameters = null 
) [static]

pretty much a helper function to set up the request

Definition at line 305 of file OAuth.php.

Here is the caller graph for this function:

static from_request ( http_method = null,
http_url = null,
parameters = null 
) [static]

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

Definition at line 254 of file OAuth.php.

Here is the caller graph for this function:

just uppercases the http method

Definition at line 395 of file OAuth.php.

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

Definition at line 403 of file OAuth.php.

get_parameter ( name)

Definition at line 344 of file OAuth.php.

Definition at line 348 of file OAuth.php.

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

Returns:
string

Definition at line 360 of file OAuth.php.

Returns the base string of this request

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

Definition at line 380 of file OAuth.php.

set_parameter ( name,
value,
allow_duplicates = true 
)

Definition at line 329 of file OAuth.php.

sign_request ( signature_method,
consumer,
token 
)

Definition at line 464 of file OAuth.php.

to_header ( )

builds the Authorization: header

Definition at line 441 of file OAuth.php.

builds the data one would send in a POST request

Definition at line 434 of file OAuth.php.

to_url ( )

builds a url usable for a GET request

Definition at line 422 of file OAuth.php.

unset_parameter ( name)

Definition at line 352 of file OAuth.php.


Field Documentation

$base_string

Definition at line 240 of file OAuth.php.

$POST_INPUT = 'php://input' [static]

Definition at line 242 of file OAuth.php.

$version = '1.0' [static]

Definition at line 241 of file OAuth.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations