IMP_Compose_Exception_Address
extends IMP_Compose_Exception
in package
implements
Countable, IteratorAggregate
Extension of IMP_Compose_Exception that handles the situation of invalid address input. Allows details of individual e-mail address errors to be communicated to the user.
Tags
Table of Contents
Interfaces
- Countable
- IteratorAggregate
Constants
Properties
- $encrypt : string
- Stores information on whether an encryption dialog window needs to be opened.
- $tied_identity : int
- If set, indicates that this identity matches the given to address.
- $_addresses : array<string|int, mixed>
- The list of error addresses.
Methods
- addAddress() : mixed
- Add an address to the bad list.
- count() : int
- Returns the number of error addresses.
- createAndLog() : IMP_Compose_Exception
- Creates a new Exception object and immediately logs the message.
- getIterator() : ArrayIterator
- log() : bool
- Log error message.
Constants
BAD
public
mixed
BAD
= 1
WARN
public
mixed
WARN
= 2
Properties
$encrypt
Stores information on whether an encryption dialog window needs to be opened.
public
string
$encrypt
= \null
$tied_identity
If set, indicates that this identity matches the given to address.
public
int
$tied_identity
= \null
$_addresses
The list of error addresses.
protected
array<string|int, mixed>
$_addresses
= array()
Methods
addAddress()
Add an address to the bad list.
public
addAddress(Horde_Mail_Rfc822_Object $address, Exception|string $msg[, int $level = self::BAD ]) : mixed
Parameters
- $address : Horde_Mail_Rfc822_Object
-
Bad address.
- $msg : Exception|string
-
Error message.
- $level : int = self::BAD
-
Severity level.
count()
Returns the number of error addresses.
public
count() : int
Return values
int —The number of error addresses.
createAndLog()
Creates a new Exception object and immediately logs the message.
public
static createAndLog() : IMP_Compose_Exception
Return values
IMP_Compose_Exception —Exception argument.
getIterator()
public
getIterator() : ArrayIterator
Return values
ArrayIteratorlog()
Log error message.
public
log([string $level = 'ERR' ]) : bool
Parameters
- $level : string = 'ERR'
-
Level to log at.
Return values
bool —True if message was logged.