API Documentation

Oauth/Client.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Oauth
version
$Id: Client.php 22051 2010-04-29 13:51:41Z padraic $
Classes
Zend_Oauth_Client

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Oauth_Client

Extends from
Zend_Http_Client
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Oauth
Properties
$supportsRevisionA
$_config
$_streamingRequest
Methods
__construct
getAdapter
setAdapter
setStreamingRequest
getStreamingRequest
_prepareBody
resetParameters
setRawDataStream
setMethod
request
prepareOauth
_getSignableParametersAsQueryString
__call

Description

Properties

$_config

Zend_Oauth_Config $_config = 'null'

Holds the current OAuth Configuration set encapsulated in an instance of Zend_Oauth_Config; it's not a Zend_Config instance since that level of abstraction is unnecessary and doesn't let me escape the accessors and mutators anyway!

Details

$_config
Zend_Oauth_Config
visibility
protected
default
null
final
false
static
false

$_streamingRequest

bool $_streamingRequest = 'null'

True if this request is being made with data supplied by a stream object instead of a raw encoded string.

Details

$_streamingRequest
bool
visibility
protected
default
null
final
false
static
false

$supportsRevisionA

 $supportsRevisionA = 'false'

Flag to indicate that the client has detected the server as supporting OAuth 1.0a

Details

visibility
public
default
false
final
false
static
true

Methods

__call

__call( string $method, array $args ) : mixed

Simple Proxy to the current Zend_Oauth_Config method. It's that instance which holds all configuration methods and values this object also presents as it's API.

Arguments
$method
string
$args
array
Output
mixed
Details
visibility
public
final
false
static
false
throws
if method does not exist in config object

__construct

__construct( array $oauthOptions, string $uri = null, array|Zend_Config $config = null ) : void

Constructor; creates a new HTTP Client instance which itself is just a typical Zend_Http_Client subclass with some OAuth icing to assist in automating OAuth parameter generation, addition and cryptographioc signing of requests.

Arguments
$oauthOptions
array
$uri
string
$config
arrayZend_Config
Details
visibility
public
final
false
static
false

_getSignableParametersAsQueryString

_getSignableParametersAsQueryString( ) : string

Collect all signable parameters into a single array across query string and POST body. These are returned as a properly formatted single query string.

Output
string
Details
visibility
protected
final
false
static
false

_prepareBody

_prepareBody( ) : string

Prepare the request body (for POST and PUT requests)

Output
string
Details
visibility
protected
final
false
static
false
throws

getAdapter

getAdapter( ) : Zend_Http_Client_Adapter_Interface|string

Return the current connection adapter

Output
Zend_Http_Client_Adapter_Interface|string
$adapter
Details
visibility
public
final
false
static
false

getStreamingRequest

getStreamingRequest( ) : boolean

Check whether the client is set to perform streaming requests.

Output
boolean
True if yes, false otherwise.
Details
visibility
public
final
false
static
false

prepareOauth

prepareOauth( ) : void

Performs OAuth preparation on the request before sending.

This primarily means taking a request, correctly encoding and signing all parameters, and applying the correct OAuth scheme to the method being used.

Details
visibility
public
final
false
static
false
throws
If POSTBODY scheme requested, but GET request method used; or if invalid request scheme provided

request

request( string $method = null ) : Zend_Http_Response

Same as Zend_Http_Client::request() except just before the request is executed, we automatically append any necessary OAuth parameters and sign the request using the relevant signature method.

Arguments
$method
string
Details
visibility
public
final
false
static
false

resetParameters

resetParameters(  $clearAll = false ) : Zend_Http_Client

Clear all custom parameters we set.

Arguments
$clearAll
Details
visibility
public
final
false
static
false

setAdapter

setAdapter( Zend_Http_Client_Adapter_Interface $adapter ) : void

Load the connection adapter

Arguments
$adapter
Zend_Http_Client_Adapter_Interface
Details
visibility
public
final
false
static
false

setMethod

setMethod( string $method = self ) : Zend_Http_Client

Same as Zend_Http_Client::setMethod() except it also creates an Oauth specific reference to the method type.

Might be defunct and removed in a later iteration.

Arguments
$method
string
Details
visibility
public
final
false
static
false

setRawDataStream

setRawDataStream( string $data, string $enctype = null ) : Zend_Http_Client

Set the raw (already encoded) POST data from a stream source.

This is used to support POSTing from open file handles without caching the entire body into memory. It is a wrapper around Zend_Http_Client::setRawData().

Arguments
$data
string
The request data
$enctype
string
The encoding type
Details
visibility
public
final
false
static
false

setStreamingRequest

setStreamingRequest( boolean $value ) : void

Set the streamingRequest variable which controls whether we are sending the raw (already encoded) POST data from a stream source.

Arguments
$value
boolean
The value to set.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.