-
Notifications
You must be signed in to change notification settings - Fork 2
/
MAILAPI_Error.php
51 lines (41 loc) · 983 Bytes
/
MAILAPI_Error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Refer to license.php for file headers and license
*/
/**
* Class that encapsulates errors that are returned from the Mail API
*/
class MAILAPI_Error
{
private $errorCode;
private $errorMessage;
public function __construct($errorCode, $errorMessage)
{
$this->errorCode = $errorCode;
$this->errorMessage = $errorMessage;
}
public function setErrorCode($errorCode)
{
$this->errorCode = $errorCode;
}
public function getErrorCode()
{
return $this->errorCode;
}
public function setErrorMessage($errorMessage)
{
$this->errorMessage = $errorMessage;
}
public function getErrorMessage()
{
return $this->errorMessage;
}
static function isError($MAILAPI_OBJECT)
{
if ($MAILAPI_OBJECT instanceof MAILAPI_Error) {
return true;
}
return false;
}
}
?>