/** * 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; }
/** * @return KeyPair */ public function getKey() { if (!$this->key) { $this->key = KeyPairGenerator::generate(); } return $this->key; }