API Documentation

Service/Nirvanix/Namespace/Base.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service
subpackage
Nirvanix
version
$Id: Base.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Service_Nirvanix_Namespace_Base

Description

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.

Zend_Service_Nirvanix_Namespace_Base

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service
subpackage
Nirvanix
Properties
$_httpClient
$_host
$_namespace
$_defaults
Methods
__construct
__call
getHttpClient
_makeUri
_wrapResponse

Description

The Nirvanix web services are split into namespaces. This is a proxy class representing one namespace. It allows calls to the namespace to be made by PHP object calls rather than by having to construct HTTP client requests.

Properties

$_defaults

 $_defaults = 'array'

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.

Details

visibility
protected
default
array
final
false
static
false
$_defaults
array

$_host

string $_host = 'http://services.nirvanix.com'

Host to use for calls to this Nirvanix namespace. It is possible that the user will wish to use different hosts for different namespaces.

Details

$_host
string
visibility
protected
default
http://services.nirvanix.com
final
false
static
false

$_httpClient

Zend_Http_Client $_httpClient = ''

HTTP client instance that will be used to make calls to the Nirvanix web services.

Details

$_httpClient
Zend_Http_Client
visibility
protected
default
final
false
static
false

$_namespace

string $_namespace = ''

Name of this namespace as used in the URL.

Details

$_namespace
string
visibility
protected
default
final
false
static
false

Methods

__call

__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.

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

Arguments
$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.
Details
visibility
public
final
false
static
false

__construct

__construct( $options $options = array ) :

Class constructor.

Arguments
$options
$options
array Options and dependency injection
Details
visibility
public
final
false
static
false

_makeUri

_makeUri( string $methodName ) : string

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

Arguments
$methodName
string
RPC method name
Output
string
Details
visibility
protected
final
false
static
false

_wrapResponse

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

Arguments
$httpResponse
Zend_Http_Response
Raw response from Nirvanix
Output
Zend_Service_Nirvanix_Response
Wrapped response
Details
visibility
protected
final
false
static
false

getHttpClient

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.

Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.