HTTP_OAuth
[ class tree: HTTP_OAuth ] [ index: HTTP_OAuth ] [ all elements ]

Class: HTTP_OAuth_Provider_Request

Source Location: /HTTP_OAuth-0.3.1/HTTP/OAuth/Provider/Request.php

Class Overview

HTTP_OAuth
   |
   --HTTP_OAuth_Message
      |
      --HTTP_OAuth_Provider_Request

HTTP_OAuth_Provider_Request


Author(s):

Copyright:

  • 2009 Jeff Hodsdon <jeffhodsdon@gmail.com>

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 41]
HTTP_OAuth_Provider_Request

NOTE: Currently, it's up to the developer to implement the provider side of timestamp and nonce checking.



[ Top ]


Class Variables

$body =  ''

[line 63]

Body data from the incoming request
  • Var: raw body data from the incoming request
  • Access: protected

Type:   string


[ Top ]

$headers = array()

[line 49]

Headers from the incoming request
  • Var: Headers from the incoming request
  • Access: protected

Type:   array


[ Top ]

$method =  ''

[line 56]

Method used in the incoming request
  • Var: Method used in the incoming request
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 74]

void __construct( [string $body = ''])

Construct
  • Access: public

Parameters:

string   $body     optional. The HTTP request body. Use this if your framework automatically reads the php://input stream.

[ Top ]

apacheRequestHeaders   [line 145]

array|null apacheRequestHeaders( )

Apache request headers

If the function exists to get the request headers from apache use it to get them, otherwise return null. Abstracted for testing purposes.

  • Return: Headers or null if no function
  • Access: protected

[ Top ]

getBody   [line 363]

string getBody( )

Gets request body
  • Return: request data
  • Access: public

[ Top ]

getHeader   [line 336]

string|null getHeader( string $header)

Gets a header
  • Return: Header if exists, null if not
  • Access: public

Parameters:

string   $header     Which header to fetch

[ Top ]

getHeaders   [line 353]

void getHeaders( )

getHeaders
  • Access: public

[ Top ]

getQueryString   [line 267]

string|null getQueryString( )

Gets incoming request query string
  • Return: Query string
  • Access: public

[ Top ]

getRequestMethod   [line 281]

string getRequestMethod( )

Get request method
  • Return: Request method
  • Access: public

[ Top ]

getRequestUri   [line 314]

string|null getRequestUri( )

Gets incoming request URI

Checks if the schema/host is included and strips it. Thanks Naosumi! Bug #16800

  • Return: Request URI, null if doesn't exist
  • Access: public

[ Top ]

getUrl   [line 295]

string getUrl( )

Get url
  • Return: URL of the request
  • Access: public

[ Top ]

isValidSignature   [line 238]

bool isValidSignature( string $consumerSecret, [string $tokenSecret = ''])

Is valid signature
  • Return: Valid or not
  • Access: public

Parameters:

string   $consumerSecret     Consumer secret value
string   $tokenSecret     Token secret value (if exists)

[ Top ]

parseQueryString   [line 379]

array parseQueryString( string $string)

Parses a query string

Does not use built-in urldecoding of name or values like $_GET and $_POST. Instead, names and values are decoded using RFC 3986 as required by OAuth.

  • Return: Data from the query string
  • Access: protected

Parameters:

string   $string     Query string

[ Top ]

peclHttpHeaders   [line 166]

array|null peclHttpHeaders( )

Pecl HTTP request headers

If the pecl_http extension is loaded use it to get the incoming request headers, otherwise return null. Abstracted for testing purposes.

  • Return: Headers or null if no extension
  • Access: protected

[ Top ]

setBody   [line 92]

HTTP_OAuth_Provider_Request setBody( [string $body = ''])

Sets the body data for this request

This is useful if your framework automatically reads the php://input stream and your API puts parameters in the request body.

  • Return: the current object, for fluent interface.
  • Access: public

Parameters:

string   $body     the HTTP request body.

[ Top ]

setHeaders   [line 112]

void setHeaders( [ $headers = array()])

Set incoming request headers
  • Access: public

Parameters:

array   $headers     Optional headers to set

[ Top ]

setParametersFromRequest   [line 182]

void setParametersFromRequest( )

Set parameters from the incoming request
  • Access: public

[ Top ]


Documentation generated on Tue, 05 Nov 2013 20:30:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.