PHP Class Scalr\Service\OpenStack\Services\AbstractService

Since: 04.12.2012
Author: Vitaliy Demidov ([email protected])
Show file Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
__construct ( OpenStack $openstack ) Constructor
__get ( string $name ) Used to retrieve service handlers
getApiHandler ( ) : object Gets an API Handler for the service
getAvailableHandlers ( ) : array Gets the list of available handlers
getEndpointUrl ( ) : string Gets endpoint url.
getName ( ) : string Gets service interface name.
getOpenStack ( ) : OpenStack Gets an OpenStack instance
getSupportedVersions ( )
getTenantId ( ) : string Gets an identifier of the tenant for current authenticated token
getVersion ( )
isExtensionSupported ( StringType | string $extensionName ) : boolean Checks whether given extension is supported by the service.
listExtensions ( ) : array List Extensions action
setVersion ( $version )

Protected Methods

Method Description
getOriginalServiceName ( string $class ) : string Gets an original service name

Method Details

__construct() public method

Constructor
public __construct ( OpenStack $openstack )
$openstack Scalr\Service\OpenStack\OpenStack

__get() public method

Used to retrieve service handlers
public __get ( string $name )
$name string

getApiHandler() public method

Gets an API Handler for the service
public getApiHandler ( ) : object
return object Returns an API Handler for the service

getAvailableHandlers() public method

Gets the list of available handlers
public getAvailableHandlers ( ) : array
return array Returns the list of available handlers

getEndpointUrl() public method

Gets endpoint url.
public getEndpointUrl ( ) : string
return string Returns Endpoint url without trailing slash

getName() public static method

Returned name must start with the lower case letter.
public static getName ( ) : string
return string Returns service interface name.

getOpenStack() public method

Gets an OpenStack instance
public getOpenStack ( ) : OpenStack
return Scalr\Service\OpenStack\OpenStack Returns OpenStack instance

getOriginalServiceName() protected static method

Gets an original service name
protected static getOriginalServiceName ( string $class ) : string
$class string A Service class name
return string Returns service name or NULL if class is not a service.

getSupportedVersions() public method

getTenantId() public method

Gets an identifier of the tenant for current authenticated token
public getTenantId ( ) : string
return string Gets an identifier of the tenant

getVersion() public method

public getVersion ( )

isExtensionSupported() public method

Checks whether given extension is supported by the service.
public isExtensionSupported ( StringType | string $extensionName ) : boolean
$extensionName StringType | string An extension name
return boolean Returns true if an extension is supported.

listExtensions() public method

This operation returns a response body. In the response body, each extension is identified by two unique identifiers, a namespace and an alias. Additionally an extension contains documentation links in various formats
public listExtensions ( ) : array
return array Returns list of available extensions

setVersion() public method

public setVersion ( $version )