示例#1
0
 /**
  * Instantiates Acme Service object.
  *
  * @return Client
  */
 protected function setup()
 {
     if (!$this->getKeyPair()) {
         $this->setKeyPair(KeyPairGenerator::generate());
     }
     if (!$this->acmeClient) {
         $this->acmeClient = new AcmeClient($this->getDictionaryEndpoint(), $this->getKeyPair());
     }
     if (!$this->acmeService) {
         $this->acmeService = new AcmeService($this->acmeClient, $this->getKeyPair());
     }
     return $this;
 }
示例#2
0
 /**
  * @return KeyPair
  */
 public function getKey()
 {
     if (!$this->key) {
         $this->key = KeyPairGenerator::generate();
     }
     return $this->key;
 }