|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
Definition at line 40 of file Client.php.
| __construct | ( | $ | uri = null | ) |
Constructor
| string | Zend_Uri_Http | $uri | URI for the web service |
Reimplemented in Zend_Service_Twitter_Search.
Definition at line 60 of file Client.php.

| __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 |
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.
| mixed | $method | |
| mixed | $data |
Reimplemented in Zend_Service_Twitter.
Definition at line 151 of file Client.php.


| getUri | ( | ) |
Retrieve the current request URI object
Definition at line 89 of file Client.php.
| restDelete | ( | $ | path | ) | [final] |
Performs an HTTP DELETE request to $path.
| string | $path |
| Zend_Http_Client_Exception |
Definition at line 197 of file Client.php.

Performs an HTTP GET request to the $path.
| string | $path | |
| array | $query | Array of GET parameters |
| Zend_Http_Client_Exception |
Definition at line 132 of file Client.php.


| restPost | ( | $ | path, |
| $ | data = null |
||
| ) | [final] |
Performs an HTTP POST request to $path.
| string | $path | |
| mixed | $data | Raw data to send |
| Zend_Http_Client_Exception |
Definition at line 170 of file Client.php.

| restPut | ( | $ | path, |
| $ | data = null |
||
| ) | [final] |
Performs an HTTP PUT request to $path.
| string | $path | |
| mixed | $data | Raw data to send in request |
| Zend_Http_Client_Exception |
Definition at line 184 of file Client.php.

| setUri | ( | $ | uri | ) |
Set the URI to use in the request
| string | Zend_Uri_Http | $uri | URI for the web service |
Definition at line 73 of file Client.php.


$_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.