Bitpay\PublicKey::setPrivateKey PHP Method

setPrivateKey() public method

public setPrivateKey ( PrivateKey $privateKey ) : bitpay\KeyInterface
$privateKey PrivateKey
return bitpay\KeyInterface
    public function setPrivateKey(PrivateKey $privateKey)
    {
        $this->privateKey = $privateKey;
        return $this;
    }

Usage Example

 /**
  * @return PublicKey
  */
 public function getPublicKey()
 {
     if (null === $this->publicKey) {
         $this->publicKey = new PublicKey();
         $this->publicKey->setPrivateKey($this);
         $this->publicKey->generate();
     }
     return $this->publicKey;
 }
All Usage Examples Of Bitpay\PublicKey::setPrivateKey