mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
45 lines
916 B
PHP
45 lines
916 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of MailSo.
|
|
*
|
|
* (c) 2014 Usenko Timur
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace MailSo\Imap\Exceptions;
|
|
|
|
/**
|
|
* @category MailSo
|
|
* @package Imap
|
|
* @subpackage Exceptions
|
|
*/
|
|
class ResponseException extends \MailSo\Imap\Exceptions\Exception
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $aResponses;
|
|
|
|
public function __construct(array $aResponses = array(), string $sMessage = '', int $iCode = 0, ?\Throwable $oPrevious = null)
|
|
{
|
|
parent::__construct($sMessage, $iCode, $oPrevious);
|
|
|
|
if (is_array($aResponses))
|
|
{
|
|
$this->aResponses = $aResponses;
|
|
}
|
|
}
|
|
|
|
public function GetResponses() : array
|
|
{
|
|
return $this->aResponses;
|
|
}
|
|
|
|
public function GetLastResponse() : ?Response
|
|
{
|
|
return 0 < count($this->aResponses) ? $this->aResponses[count($this->aResponses) - 1] : null;
|
|
}
|
|
}
|