Added individual signatures for every identity.

This commit is contained in:
RainLoop Team 2015-02-08 05:11:13 +04:00
parent 996703311b
commit 1119022916
45 changed files with 1353 additions and 337 deletions

View file

@ -29,6 +29,16 @@ class Identity
*/
private $sBcc;
/**
* @var string
*/
private $sSignature;
/**
* @var bool
*/
private $bSignatureInsertBefore;
/**
* @param string $sId = ''
* @param string $sEmail = ''
@ -42,6 +52,8 @@ class Identity
$this->sName = '';
$this->sReplyTo = '';
$this->sBcc = '';
$this->sSignature = '';
$this->bSignatureInsertBefore = false;
}
/**
@ -114,6 +126,22 @@ class Identity
return $this->sBcc;
}
/**
* @return string
*/
public function Signature()
{
return $this->sSignature;
}
/**
* @return bool
*/
public function SignatureInsertBefore()
{
return $this->bSignatureInsertBefore;
}
/**
* @param array $aData
* @param bool $bAjax = false
@ -129,6 +157,9 @@ class Identity
$this->sName = isset($aData['Name']) ? $aData['Name'] : '';
$this->sReplyTo = !empty($aData['ReplyTo']) ? $aData['ReplyTo'] : '';
$this->sBcc = !empty($aData['Bcc']) ? $aData['Bcc'] : '';
$this->sSignature = !empty($aData['Signature']) ? $aData['Signature'] : '';
$this->bSignatureInsertBefore = isset($aData['SignatureInsertBefore']) ?
($bAjax ? '1' === $aData['SignatureInsertBefore'] : !!$aData['SignatureInsertBefore']) : true;
return true;
}
@ -148,7 +179,9 @@ class Identity
'Email' => $bAjax ? \MailSo\Base\Utils::IdnToUtf8($this->Email()) : $this->Email(),
'Name' => $this->Name(),
'ReplyTo' => $this->ReplyTo(),
'Bcc' => $this->Bcc()
'Bcc' => $this->Bcc(),
'Signature' => $this->Signature(),
'SignatureInsertBefore' => $this->SignatureInsertBefore()
);
}