mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Bugfix: ResponseCollection $oResult => $this Removed safe_mode detection Speedup: ImapClient::partialParseResponseBranch() and partialResponseLiteralCallbackCallable()
45 lines
980 B
PHP
45 lines
980 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 $oResponses;
|
|
|
|
public function __construct(?\MailSo\Imap\ResponseCollection $oResponses = null, string $sMessage = '', int $iCode = 0, ?\Throwable $oPrevious = null)
|
|
{
|
|
parent::__construct($sMessage, $iCode, $oPrevious);
|
|
|
|
$this->oResponses = $oResponses;
|
|
}
|
|
|
|
public function GetResponses() : ?\MailSo\Imap\ResponseCollection
|
|
{
|
|
return $this->oResponses;
|
|
}
|
|
|
|
public function GetLastResponse() : ?\MailSo\Imap\Response
|
|
{
|
|
if ($this->oResponses && \count($this->oResponses)) {
|
|
return $this->oResponses[count($this->oResponses) - 1];
|
|
}
|
|
return null;
|
|
}
|
|
}
|