OAuth Request

Class Methods

The following methods can be invoked on instances of this class.

__construct(mixed strHttpMethod, mixed strHttpUrl, mixed arrParameters)

fromRequest(mixed strHttpMethod, mixed strHttpUrl, mixed arrParameters)

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

fromConsumerAndToken(mixed pConsumer, mixed pToken, mixed strHttpMethod, mixed strHttpUrl, mixed arrParameters)

pretty much a helper function to set up the request

setParameter(mixed strName, mixed strValue, mixed bAllowDuplicates)

getParameter(mixed strName)

getParameters()

unsetParameter(mixed strName)

getSignableParameters()

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

getSignatureBaseString()

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 &.

getNormalizedHttpMethod()

just uppercases the http method

getNormalizedHttpUrl()

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

toUrl()

builds a url usable for a GET request

toPostdata()

builds the data one would send in a POST request

toHeader(mixed strRealm)

builds the Authorization: header

__toString()

signRequest(mixed pSignatureMethod, mixed pConsumer, mixed strToken)

buildSignature(mixed pSignatureMethod, mixed pConsumer, mixed strToken)

generateTimestamp()

util function: current timestamp

generateNonce()

util function: current nonce

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class