Partner.php in Lockr 7.2
File
vendor/lockr/lockr-client/src/Partner.php
View source
<?php
namespace Lockr;
class Partner implements PartnerInterface {
protected $cert;
protected $partner;
protected $region;
public function __construct($cert, $partner, $region = 'us') {
$this->cert = $cert;
$this->partner = $partner;
$this->region = $region;
}
public function requestOptions() {
return array(
'cert' => $this->cert,
);
}
public function getReadUri() {
if ($this->region != 'us') {
return "https://{$this->region}.{$this->partner}.api.lockr.io";
}
return "https://{$this->partner}.api.lockr.io";
}
public function getWriteUri() {
if ($this->region != 'us') {
return "https://{$this->region}.{$this->partner}.api.lockr.io";
}
return "https://{$this->partner}.api.lockr.io";
}
public function getAccountingUri() {
return "https://{$this->partner}.api.lockr.io";
}
}