Пример #1
0
 /**
  * @param array $options
  * @param null|HttpClient $httpClient
  */
 public function __construct(array $options, HttpClient $httpClient = null)
 {
     parent::__construct($options, $httpClient);
     $this->api->setApiPath(__DIR__ . '/api/blockstorage');
     $region = isset($options['region']) ? $options['region'] : null;
     $url = $this->getPublicUrl('volume', null, $region);
     if (false !== $url) {
         $this->api->setUrl($url);
     }
 }
Пример #2
0
 /**
  * @param array $options
  * @param null|HttpClient $httpClient
  */
 public function __construct(array $options, HttpClient $httpClient = null)
 {
     parent::__construct($options, $httpClient);
     $this->api->setApiPath(__DIR__ . '/api/compute');
     $region = isset($options['region']) ? $options['region'] : null;
     $url = $this->getPublicUrl('compute', self::API_VERSION, $region);
     if (false !== $url) {
         $this->api->setUrl($url);
     }
 }