You are here

class Partner in Lockr 7

Same name and namespace in other branches
  1. 7.2 vendor/lockr/lockr-client/src/Partner.php \Lockr\Partner

Hierarchy

Expanded class hierarchy of Partner

File

src/Lockr/Partner.php, line 6

Namespace

Lockr
View source
class Partner implements PartnerInterface {

  /**
   * @var string The SSL cert path.
   */
  protected $cert;

  /**
   * @var string The Lockr partner.
   */
  protected $partner;

  /**
   * Constucts the partner.
   */
  public function __construct($cert, $partner) {
    $this->cert = $cert;
    $this->partner = $partner;
  }

  /**
   * {@inheritdoc}
   */
  public function requestOptions() {
    return array(
      'cert' => $this->cert,
    );
  }

  /**
   * {@inheritdoc}
   */
  public function getReadUri() {
    return "https://{$this->partner}.api.lockr.io";
  }

  /**
   * {@inheritdoc}
   */
  public function getWriteUri() {
    return "https://{$this->partner}.api.lockr.io";
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Partner::$cert protected property
Partner::$partner protected property
Partner::getReadUri public function Gets the partner base URI for reading data. Overrides PartnerInterface::getReadUri
Partner::getWriteUri public function Gets the partner base URI for writing data. Overrides PartnerInterface::getWriteUri
Partner::requestOptions public function Adds required request options to the request for partner authentication. Overrides PartnerInterface::requestOptions
Partner::__construct public function Constucts the partner.