mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-26 08:38:22 +08:00
57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
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\Pop3\Exceptions;
|
|
|
|
/**
|
|
* @category MailSo
|
|
* @package Pop3
|
|
* @subpackage Exceptions
|
|
*/
|
|
class ResponseException extends \MailSo\Pop3\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\Pop3\Response | null
|
|
*/
|
|
public function GetLastResponse()
|
|
{
|
|
return 0 < count($this->aResponses) ? $this->aResponses[count($this->aResponses) - 1] : null;
|
|
}
|
|
}
|