PHP Класс Scalr\Service\OpenStack\Client\RestClient

С версии: 06.12.2012
Автор: Vitaliy Demidov ([email protected])
Наследование: implements Scalr\Service\OpenStack\Client\ClientInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$config Scalr\Service\OpenStack\OpenStackConfig OpenStack config

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

auth() публичный Метод

Performs an authentication request
public auth ( ) : object
Результат object Returns result

call() публичный Метод

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() защищенный Метод

Creates new http Request object
protected createHttpRequest ( ) : Scalr\System\Http\Client\Request
Результат Scalr\System\Http\Client\Request Returns new http Request object

getConfig() публичный Метод

Gets OpenStack config
public getConfig ( ) : OpenStackConfig
Результат Scalr\Service\OpenStack\OpenStackConfig A OpenStack config.

resetDebug() публичный Метод

Resets debug mode
public resetDebug ( ) : RestClient
Результат RestClient

setDebug() публичный Метод

Sets debug mode
public setDebug ( boolean $bDebug = true ) : RestClient
$bDebug boolean ptional If true it will output debug per request into stdout
Результат RestClient

tryCall() защищенный Метод

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.
Результат http\Client\Response Returns http Response if success.

Описание свойств

$config защищенное свойство

OpenStack config
protected OpenStackConfig,Scalr\Service\OpenStack $config
Результат Scalr\Service\OpenStack\OpenStackConfig