Oauth/Client.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Oauth
- Version
- $Id$
Package: Zend_OauthZend_Http_Client is an implementation of an HTTP client in PHP. The client
supports basic features like sending different HTTP requests and handling
redirections, as well as more advanced features like proxy settings, HTTP
authentication and cookie persistence (using a Zend_Http_CookieJar object)
- Parent(s)
- \Zend_Http_Client
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
bool $_streamingRequest = null
True if this request is being made with data supplied by
a stream object instead of a raw encoded string.
Default valuenull
Details- Type
- bool
$supportsRevisionA = false
staticFlag to indicate that the client has detected the server as supporting
OAuth 1.0a
Default valuefalse
Details- Type
- n/a
Methods
__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.
ParametersName | Type | Description |
---|
$method | string | |
---|
$args | array | |
---|
ReturnsThrows getStreamingRequest() : boolean
Check whether the client is set to perform streaming requests.
ReturnsType | Description |
---|
boolean | True if yes, false otherwise. |
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.
ThrowsException | Description |
---|
\Zend_Oauth_Exception | If POSTBODY scheme requested, but GET request method used; or if invalid request scheme provided |
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.
ParametersName | Type | Description |
---|
$method | string | |
---|
Returns resetParameters( $clearAll = false) : \Zend_Http_Client
Clear all custom parameters we set.
ParametersName | Type | Description |
---|
$clearAll | | |
---|
Returns setMethod(string $method = self::GET) : \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.
ParametersName | Type | Description |
---|
$method | string | |
---|
ReturnssetRawDataStream(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().
ParametersName | Type | Description |
---|
$data | string | The request data |
---|
$enctype | string | The encoding type |
---|
ReturnssetStreamingRequest(boolean $value) : void
Set the streamingRequest variable which controls whether we are
sending the raw (already encoded) POST data from a stream source.
ParametersName | Type | Description |
---|
$value | boolean | The value to set. |
---|