mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
v1.2.7.416
This commit is contained in:
parent
54e2645fcf
commit
3b27abbe9a
434 changed files with 51 additions and 72 deletions
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace MailSo\Smtp\Exceptions;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
* @package Smtp
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class ResponseException extends \MailSo\Smtp\Exceptions\Exception
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $aResponses;
|
||||
|
||||
/**
|
||||
* @param array $aResponses = array
|
||||
* @param string $sMessage = ''
|
||||
* @param int $iCode = 0
|
||||
* @param \Exception $oPrevious = null
|
||||
*/
|
||||
public function __construct($aResponses = array(), $sMessage = '', $iCode = 0, $oPrevious = null)
|
||||
{
|
||||
parent::__construct($sMessage, $iCode, $oPrevious);
|
||||
|
||||
if (is_array($aResponses))
|
||||
{
|
||||
$this->aResponses = $aResponses;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function GetResponses()
|
||||
{
|
||||
return $this->aResponses;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \MailSo\Smtp\Response | null
|
||||
*/
|
||||
public function GetLastResponse()
|
||||
{
|
||||
return 0 < count($this->aResponses) ? $this->aResponses[count($this->aResponses) - 1] : null;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue