PHP Class Scalr\Service\OpenStack\Client\RestClient

Since: 06.12.2012
Author: Vitaliy Demidov ([email protected])
Inheritance: implements Scalr\Service\OpenStack\Client\ClientInterface
Afficher le fichier Open project: scalr/scalr

Protected Properties

Свойство Type Description
$config Scalr\Service\OpenStack\OpenStackConfig OpenStack config

Méthodes publiques

Méthode Description
__construct ( OpenStackConfig $config ) Constructor
auth ( ) : object Performs an authentication request
call ( $service, $path = '/', array $options = null, $verb = 'GET', Scalr\Service\OpenStack\Type\AppFormat $accept = null, $auth = true )
getConfig ( ) : OpenStackConfig Gets OpenStack config
resetDebug ( ) : RestClient Resets debug mode
setDebug ( boolean $bDebug = true ) : RestClient Sets debug mode

Méthodes protégées

Méthode Description
createHttpRequest ( ) : Scalr\System\Http\Client\Request Creates new http Request object
tryCall ( Scalr\System\Http\Client\Request $httpRequest, integer $attempts = 1, integer $interval = 200 ) : http\Client\Response Tries to send request on several attempts.

Method Details

__construct() public méthode

Constructor
public __construct ( OpenStackConfig $config )
$config Scalr\Service\OpenStack\OpenStackConfig A OpenStack config.

auth() public méthode

Performs an authentication request
public auth ( ) : object
Résultat object Returns result

call() public méthode

public call ( $service, $path = '/', array $options = null, $verb = 'GET', Scalr\Service\OpenStack\Type\AppFormat $accept = null, $auth = true )
$options array
$accept Scalr\Service\OpenStack\Type\AppFormat

createHttpRequest() protected méthode

Creates new http Request object
protected createHttpRequest ( ) : Scalr\System\Http\Client\Request
Résultat Scalr\System\Http\Client\Request Returns new http Request object

getConfig() public méthode

Gets OpenStack config
public getConfig ( ) : OpenStackConfig
Résultat Scalr\Service\OpenStack\OpenStackConfig A OpenStack config.

resetDebug() public méthode

Resets debug mode
public resetDebug ( ) : RestClient
Résultat RestClient

setDebug() public méthode

Sets debug mode
public setDebug ( boolean $bDebug = true ) : RestClient
$bDebug boolean ptional If true it will output debug per request into stdout
Résultat RestClient

tryCall() protected méthode

Tries to send request on several attempts.
protected tryCall ( Scalr\System\Http\Client\Request $httpRequest, integer $attempts = 1, integer $interval = 200 ) : http\Client\Response
$httpRequest Scalr\System\Http\Client\Request
$attempts integer Attempts count.
$interval integer An sleep interval between an attempts in microseconds.
Résultat http\Client\Response Returns http Response if success.

Property Details

$config protected_oe property

OpenStack config
protected OpenStackConfig,Scalr\Service\OpenStack $config
Résultat Scalr\Service\OpenStack\OpenStackConfig