Class Zend_Rest_Client

Description
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Rest/Client.php (line 40)

Zend_Service_Abstract
   |
   --Zend_Rest_Client
Direct descendents
Variable Summary
Method Summary
 void __construct ([string|Zend_Uri_Http $uri = null])
 Zend_Http_Response restDelete (string $path)
 Zend_Http_Response restGet (string $path, [ $query = null])
 Zend_Http_Response restPost (string $path, [mixed $data = null])
 Zend_Http_Response restPut (string $path, [mixed $data = null])
 Zend_Http_Response _performPost (mixed $method, [mixed $data = null])
 Zend_Rest_Client_Result|Zend_Rest_Client __call (string $method, array $args)
Variables
array $_data = array() (line 46)

Data for the query

  • access: protected
Zend_Uri_Http $_uri = null (line 52)

Zend_Uri of this web service

  • access: protected

Redefined in descendants as:

Inherited Variables

Inherited from Zend_Service_Abstract

Zend_Service_Abstract::$_httpClient
Methods
Constructor __construct (line 60)

Constructor

  • access: public
void __construct ([string|Zend_Uri_Http $uri = null])

Redefined in descendants as:
getUri (line 89)

Retrieve the current request URI object

  • access: public
Zend_Uri_Http getUri ()
restDelete (line 197)

Performs an HTTP DELETE request to $path.

  • throws: Zend_Http_Client_Exception
  • access: public
Zend_Http_Response restDelete (string $path)
  • string $path
restGet (line 132)

Performs an HTTP GET request to the $path.

  • throws: Zend_Http_Client_Exception
  • access: public
Zend_Http_Response restGet (string $path, [ $query = null])
  • string $path
  • array $query: Array of GET parameters
restPost (line 170)

Performs an HTTP POST request to $path.

  • throws: Zend_Http_Client_Exception
  • access: public
Zend_Http_Response restPost (string $path, [mixed $data = null])
  • string $path
  • mixed $data: Raw data to send
restPut (line 184)

Performs an HTTP PUT request to $path.

  • throws: Zend_Http_Client_Exception
  • access: public
Zend_Http_Response restPut (string $path, [mixed $data = null])
  • string $path
  • mixed $data: Raw data to send in request
setUri (line 73)

Set the URI to use in the request

  • access: public
Zend_Rest_Client setUri (string|Zend_Uri_Http $uri)
_performPost (line 151)

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.

  • access: protected
Zend_Http_Response _performPost (mixed $method, [mixed $data = null])
  • mixed $method
  • mixed $data

Redefined in descendants as:
__call (line 224)

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):

  1.  $response $rest->sayHello('Foo''Manchu')->get();

Or use them together, but in sequential calls:

  1.  $rest->sayHello('Foo''Manchu');
  2.  $response $rest->get();

  • return: Zend_Rest_Client if using a remote method, Zend_Rest_Client_Result if using an HTTP request method
  • access: public
Zend_Rest_Client_Result|Zend_Rest_Client __call (string $method, array $args)
  • string $method: Method name
  • array $args: Method args

Redefined in descendants as:

Inherited Methods

Inherited From Zend_Service_Abstract

 Zend_Service_Abstract::getHttpClient()
 Zend_Service_Abstract::setHttpClient()

Documentation generated on Mon, 21 Jun 2010 15:12:02 -0400 by phpDocumentor 1.4.3