Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Namespace proxy with additional convenience methods for the IMFS namespace.

__call(
string $methodName, array $args
)
:
\Zend_Service_Nirvanix_Response
When a method call is made against this proxy, convert it to an HTTP request to make against the Nirvanix REST service.
Inherited from: \Zend_Service_Nirvanix_Namespace_Base::__call()$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).
Name | Type | Description |
---|---|---|
$methodName | string | Name of the command to call on this namespace. |
$args | array | Only the first is used and it must be an array. It contains the POST params. |
Type | Description |
---|---|
\Zend_Service_Nirvanix_Response |

__construct(
array $options
=
array
)
:
void
Class constructor.
Inherited from: \Zend_Service_Nirvanix_Namespace_Base::__construct()Name | Type | Description |
---|---|---|
$options | array | Options and dependency injection |

_makeUri(
string $methodName
)
:
string
Make a complete URI from an RPC method name. All Nirvanix REST service URIs use the same format.
Inherited from: \Zend_Service_Nirvanix_Namespace_Base::_makeUri()Name | Type | Description |
---|---|---|
$methodName | string | RPC method name |
Type | Description |
---|---|
string |

_wrapResponse(
\Zend_Http_Response $httpResponse
)
:
\Zend_Service_Nirvanix_Response
All Nirvanix REST service calls return an XML payload. This method makes a Zend_Service_Nirvanix_Response from that XML payload.
Inherited from: \Zend_Service_Nirvanix_Namespace_Base::_wrapResponse()Name | Type | Description |
---|---|---|
$httpResponse | \Zend_Http_Response | Raw response from Nirvanix |
Type | Description |
---|---|
\Zend_Service_Nirvanix_Response | Wrapped response |

getContents(
string $filePath, integer $expiration
=
3600
)
:
string
Convenience function to get the contents of a file on the Nirvanix IMFS. Analog to PHP's file_get_contents().
Name | Type | Description |
---|---|---|
$filePath | string | Remote path and filename |
$expiration | integer | Number of seconds that Nirvanix make the file available for download. |
Type | Description |
---|---|
string | Contents of file |

getHttpClient(
)
:
\Zend_Http_Client
Return the HTTP client used for this namespace. This is useful for inspecting the last request or directly interacting with the HTTP client.
Inherited from: \Zend_Service_Nirvanix_Namespace_Base::getHttpClient()Type | Description |
---|---|
\Zend_Http_Client |

putContents(
string $filePath, integer $data, string $mimeType
=
null
)
:
\Zend_Service_Nirvanix_Response
Convenience function to put the contents of a string into the Nirvanix IMFS. Analog to PHP's file_put_contents().
Name | Type | Description |
---|---|---|
$filePath | string | Remote path and filename |
$data | integer | Data to store in the file |
$mimeType | string | Mime type of data |
Type | Description |
---|---|
\Zend_Service_Nirvanix_Response |

unlink(
string $filePath
)
:
\Zend_Service_Nirvanix_Response
Convenience function to remove a file from the Nirvanix IMFS.
Analog to PHP's unlink().
Name | Type | Description |
---|---|---|
$filePath | string | Remove path and filename |
Type | Description |
---|---|
\Zend_Service_Nirvanix_Response |