public function setOption(string $key, $value): self
    {
        $options = $this->options;
        $options[$key] = $value;
        // Try to set this, so it will throw an exception
        try {
            (new \Crypt_GPG($options));
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'Could not set option "' . $key . '": ' . $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
        $this->options = $options;
        return $this;
    }
public function setOption(string $key, $value): self
    {
        $options = $this->options;
        $options[$key] = $value;
        // Try to set this, so it will throw an exception
        try {
            (new \Crypt_GPG($options));
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'Could not set option "' . $key . '": ' . $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
        $this->options = $options;
        return $this;
    }
public function setOption ( string $ key , $ value ) : self { $ options = $ this -> options ; $ options [ $ key ] = $ value ; // Try to set this, so it will throw an exception try { ( new \ Crypt_GPG ( $ options ) ) ; } catch ( \ PEAR_Exception $ ex ) { throw new GPGMailerException ( 'Could not set option "' . $ key . '": ' . $ ex -> getMessage ( ) , $ ex -> getCode ( ) , $ ex ) ; } $ this -> options = $ options ; return $ this ; }
Override an option at runtime

@param string $key
@param string|int|float|bool|null|array $value

@return self
@throws GPGMailerException
Override an option at runtime