Kelunik\Acme\AcmeService::register PHP Méthode

register() public méthode

Registers a new account on the server.
public register ( string $email, string | null $agreement = null ) : Amp\Promise
$email string e-mail address for contact
$agreement string | null agreement URI or null if not agreed yet
Résultat Amp\Promise resolves to a Registration object
    public function register($email, $agreement = null)
    {
        return \Amp\resolve($this->doRegister($email, $agreement));
    }

Usage Example

Exemple #1
0
 /**
  * Register user at ACME
  *
  * @throws \Kelunik\Acme\AcmeException
  */
 public function register()
 {
     try {
         \amp\wait($this->acme->register($this->email));
     } catch (\Exception $e) {
         throw new \Exception('Error registering ' . $this->email . ': ' . $e->getMessage(), 0, $e);
     }
     $this->config('status', 'registered at Let\'s Encrypt');
     $this->config('email', $this->email);
 }
All Usage Examples Of Kelunik\Acme\AcmeService::register