Class Zend_Rest_Client

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

Located in /Zend/Rest/Client.php (line 39)

Zend_Service_Abstract
   |
   --Zend_Rest_Client
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 45)

Data for the query

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

Zend_Uri of this web service

  • access: protected

Inherited Variables

Inherited from Zend_Service_Abstract

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

Constructor

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

Retrieve the current request URI object

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

Performs an HTTP DELETE request to $path.

  • access: public
Zend_Http_Response restDelete (string $path)
  • string $path
restGet (line 130)

Performs an HTTP GET request to the $path.

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

Performs an HTTP POST request to $path.

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

Performs an HTTP PUT request to $path.

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

Set the URI to use in the request

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

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
__call (line 225)

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();

You can also use an HTTP request method as a calling method, using the path as the first argument:

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

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

Inherited Methods

Inherited From Zend_Service_Abstract

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

Documentation generated on Wed, 21 Feb 2007 11:46:15 -0800 by phpDocumentor 1.3.1