Moodle  2.2.1
http://www.collinsharper.com
Zend_Rest_Client Class Reference
Inheritance diagram for Zend_Rest_Client:
Collaboration diagram for Zend_Rest_Client:

Public Member Functions

 __construct ($uri=null)
 setUri ($uri)
 getUri ()
 restGet ($path, array $query=null)
 restPost ($path, $data=null)
 restPut ($path, $data=null)
 restDelete ($path)
 __call ($method, $args)

Protected Member Functions

 _performPost ($method, $data=null)

Protected Attributes

 $_data = array()
 $_uri = null

Detailed Description

Definition at line 40 of file Client.php.


Constructor & Destructor Documentation

__construct ( uri = null)

Constructor

Parameters:
string | Zend_Uri_Http$uriURI for the web service
Returns:
void

Reimplemented in Zend_Service_Twitter_Search.

Definition at line 60 of file Client.php.

Here is the call graph for this function:


Member Function Documentation

__call ( method,
args 
)

Method call overload

Allows calling REST actions as object methods; however, you must follow-up by chaining the request with a request to an HTTP request method (post, get, delete, put): $response = $rest->sayHello('Foo', 'Manchu')->get();

Or use them together, but in sequential calls: $rest->sayHello('Foo', 'Manchu'); $response = $rest->get();

Parameters:
string$methodMethod name
array$argsMethod args
Returns:
Zend_Rest_Client_Result|Zend_Rest_Client Zend_Rest_Client if using a remote method, Zend_Rest_Client_Result if using an HTTP request method

Reimplemented in Zend_Service_Twitter.

Definition at line 224 of file Client.php.

_performPost ( method,
data = null 
) [protected]

Perform a POST or PUT

Performs a POST or PUT request. Any data provided is set in the HTTP client. String data is pushed in as raw POST data; array or object data is pushed in as POST parameters.

Parameters:
mixed$method
mixed$data
Returns:
Zend_Http_Response

Reimplemented in Zend_Service_Twitter.

Definition at line 151 of file Client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getUri ( )

Retrieve the current request URI object

Returns:
Zend_Uri_Http

Definition at line 89 of file Client.php.

restDelete ( path) [final]

Performs an HTTP DELETE request to $path.

Parameters:
string$path
Exceptions:
Zend_Http_Client_Exception
Returns:
Zend_Http_Response

Definition at line 197 of file Client.php.

Here is the call graph for this function:

restGet ( path,
array query = null 
) [final]

Performs an HTTP GET request to the $path.

Parameters:
string$path
array$queryArray of GET parameters
Exceptions:
Zend_Http_Client_Exception
Returns:
Zend_Http_Response

Definition at line 132 of file Client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

restPost ( path,
data = null 
) [final]

Performs an HTTP POST request to $path.

Parameters:
string$path
mixed$dataRaw data to send
Exceptions:
Zend_Http_Client_Exception
Returns:
Zend_Http_Response

Definition at line 170 of file Client.php.

Here is the call graph for this function:

restPut ( path,
data = null 
) [final]

Performs an HTTP PUT request to $path.

Parameters:
string$path
mixed$dataRaw data to send in request
Exceptions:
Zend_Http_Client_Exception
Returns:
Zend_Http_Response

Definition at line 184 of file Client.php.

Here is the call graph for this function:

setUri ( uri)

Set the URI to use in the request

Parameters:
string | Zend_Uri_Http$uriURI for the web service
Returns:
Zend_Rest_Client

Definition at line 73 of file Client.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_data = array() [protected]

Definition at line 46 of file Client.php.

$_uri = null [protected]

Reimplemented in Zend_Service_Twitter_Search.

Definition at line 52 of file Client.php.


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