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

Public Member Functions

 __construct ($options=array())
 __call ($methodName, $args)
 getHttpClient ()

Protected Member Functions

 _makeUri ($methodName)
 _wrapResponse ($httpResponse)

Protected Attributes

 $_httpClient
 $_host = 'http://services.nirvanix.com'
 $_namespace = ''
 $_defaults = array()

Detailed Description

Definition at line 44 of file Base.php.


Constructor & Destructor Documentation

__construct ( options = array())

Class constructor.

Parameters:
$optionsarray Options and dependency injection

Definition at line 81 of file Base.php.


Member Function Documentation

__call ( methodName,
args 
)

When a method call is made against this proxy, convert it to an HTTP request to make against the Nirvanix REST service.

$imfs->DeleteFiles(array('filePath' => 'foo'));

Assuming this object was proxying the IMFS namespace, the method call above would call the DeleteFiles command. The POST parameters would be filePath, merged with the $this->_defaults (containing the sessionToken).

Parameters:
string$methodNameName of the command to call on this namespace.
array$argsOnly the first is used and it must be an array. It contains the POST params.
Returns:
Zend_Service_Nirvanix_Response

Definition at line 119 of file Base.php.

Here is the call graph for this function:

_makeUri ( methodName) [protected]

Make a complete URI from an RPC method name. All Nirvanix REST service URIs use the same format.

Parameters:
string$methodNameRPC method name
Returns:
string

Definition at line 155 of file Base.php.

Here is the caller graph for this function:

_wrapResponse ( httpResponse) [protected]

All Nirvanix REST service calls return an XML payload. This method makes a Zend_Service_Nirvanix_Response from that XML payload.

Parameters:
Zend_Http_Response$httpResponseRaw response from Nirvanix
Returns:
Zend_Service_Nirvanix_Response Wrapped response

Definition at line 168 of file Base.php.

Here is the caller graph for this function:

Return the HTTP client used for this namespace. This is useful for inspecting the last request or directly interacting with the HTTP client.

Returns:
Zend_Http_Client

Definition at line 143 of file Base.php.


Field Documentation

$_defaults = array() [protected]

Defaults for POST parameters. When a request to the service is to be made, the POST parameters are merged into these. This is a convenience feature so parameters that are repeatedly required like sessionToken do not need to be supplied again and again by the user.

Parameters:
array

Definition at line 74 of file Base.php.

$_host = 'http://services.nirvanix.com' [protected]

Definition at line 58 of file Base.php.

$_httpClient [protected]

Definition at line 51 of file Base.php.

$_namespace = '' [protected]

Definition at line 64 of file Base.php.


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