dolibarr/htdocs/includes/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php

65 lines
1.2 KiB
PHP
Raw Normal View History

2016-04-16 18:15:03 +02:00
<?php
/*
* This file is part of SwiftMailer.
* (c) 2004-2009 Chris Corbyn
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Generated when a response is received on a SMTP connection.
*
* @author Chris Corbyn
*/
class Swift_Events_ResponseEvent extends Swift_Events_EventObject
{
/**
* The overall result.
*
* @var bool
*/
2018-01-21 15:55:56 +01:00
private $valid;
2016-04-16 18:15:03 +02:00
/**
* The response received from the server.
*
* @var string
*/
2018-01-21 15:55:56 +01:00
private $response;
2016-04-16 18:15:03 +02:00
/**
* Create a new ResponseEvent for $source and $response.
*
2021-12-07 17:11:34 +01:00
* @param string $response
* @param bool $valid
2016-04-16 18:15:03 +02:00
*/
public function __construct(Swift_Transport $source, $response, $valid = false)
{
parent::__construct($source);
2018-01-21 15:55:56 +01:00
$this->response = $response;
$this->valid = $valid;
2016-04-16 18:15:03 +02:00
}
/**
* Get the response which was received from the server.
*
* @return string
*/
public function getResponse()
{
2018-01-21 15:55:56 +01:00
return $this->response;
2016-04-16 18:15:03 +02:00
}
/**
* Get the success status of this Event.
*
* @return bool
*/
public function isValid()
{
2018-01-21 15:55:56 +01:00
return $this->valid;
2016-04-16 18:15:03 +02:00
}
}