Zend Framework
1.12
|
Public Member Functions | |
__construct ($uri=null) | |
Constructor. | |
setUri ($uri) | |
Set the URI to use in the request. | |
getUri () | |
Retrieve the current request URI object. | |
setNoReset ($bool=true) | |
Tells Zend_Rest_Client not to reset all parameters on it's Zend_Http_Client. | |
restGet ($path, array $query=null) | |
Performs an HTTP GET request to the $path. | |
restPost ($path, $data=null) | |
Performs an HTTP POST request to $path. | |
restPut ($path, $data=null) | |
Performs an HTTP PUT request to $path. | |
restDelete ($path, $data=null) | |
Performs an HTTP DELETE request to $path. | |
__call ($method, $args) | |
Method call overload. | |
Protected Member Functions | |
_performPost ($method, $data=null) | |
Perform a POST or PUT. | |
Protected Attributes | |
$_data = array() | |
$_uri = null | |
$_noReset = false | |
Additional Inherited Members | |
![]() | |
static | setHttpClient (Zend_Http_Client $httpClient) |
Sets the HTTP client object to use for retrieving the feeds. | |
static | getHttpClient () |
Gets the HTTP client object. | |
![]() | |
static | $_httpClient = null |
__construct | ( | $uri = null | ) |
__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();
string | $method | Method name |
array | $args | Method args |
|
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.
mixed | $method | |
mixed | $data |
getUri | ( | ) |
Retrieve the current request URI object.
restDelete | ( | $path, | |
$data = null |
|||
) |
Performs an HTTP DELETE request to $path.
string | $path |
Zend_Http_Client_Exception |
restGet | ( | $path, | |
array | $query = null |
||
) |
Performs an HTTP GET request to the $path.
string | $path | |
array | $query | Array of GET parameters |
Zend_Http_Client_Exception |
restPost | ( | $path, | |
$data = null |
|||
) |
Performs an HTTP POST request to $path.
string | $path | |
mixed | $data | Raw data to send |
Zend_Http_Client_Exception |
restPut | ( | $path, | |
$data = null |
|||
) |
Performs an HTTP PUT request to $path.
string | $path | |
mixed | $data | Raw data to send in request |
Zend_Http_Client_Exception |
setNoReset | ( | $bool = true | ) |
Tells Zend_Rest_Client not to reset all parameters on it's Zend_Http_Client.
If you want no reset, this must be called explicitly before every request for which you do not want to reset the parameters. Parameters will accumulate between requests, but as soon as you do not call this function prior to any request, all preset parameters will be reset as by default.
boolean | $bool |
setUri | ( | $uri | ) |
Set the URI to use in the request.
string | Zend_Uri_Http | $uri | URI for the web service |
|
protected |
|
protected |
|
protected |