1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-06 11:58:30 +01:00
phorge-phorge/src/applications/legalpad/storage/LegalpadDocumentSignature.php

38 lines
770 B
PHP
Raw Normal View History

<?php
/**
* @group legalpad
*/
final class LegalpadDocumentSignature extends LegalpadDAO {
const VERIFIED = 0;
const UNVERIFIED = 1;
protected $documentPHID;
protected $documentVersion;
protected $signerPHID;
protected $signatureData = array();
protected $verified;
protected $secretKey;
public function getConfiguration() {
return array(
self::CONFIG_SERIALIZATION => array(
'signatureData' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
}
public function save() {
if (!$this->getSecretKey()) {
$this->setSecretKey(Filesystem::readRandomCharacters(20));
}
return parent::save();
}
public function isVerified() {
return $this->getVerified() != self::UNVERIFIED;
}
}