EmailWriter
in package
implements
EmailWriterInterface
Uses
HtmlUtilityTrait
Class EmailWriter
Writes email records in the database (insert/update operations).
Tags
Interfaces, Classes and Traits
- EmailWriterInterface
- Interface EmailWriterInterface
Table of Contents
- $db : CI_DB_query_builder
- Query builder.
- __construct() : mixed
- Class Constructor
- htmlentitiesWrapper() : mixed
- htmlEntityDecodeWrapper() : mixed
- write() : mixed
- Save (insert/update) an email record.
- _insert() : mixed
- Inserts an email record to the database.
- _update() : mixed
- Updates an email record from the database.
- _writeContactsAndAttachments() : mixed
- Writes email contacts and attachments.
Properties
$db
Query builder.
protected
CI_DB_query_builder
$db
Methods
__construct()
Class Constructor
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
-
Query builder.
Return values
mixed —htmlentitiesWrapper()
public
htmlentitiesWrapper(mixed $string[, mixed $flags = false ][, mixed $encoding = '' ][, mixed $doubleEncode = true ]) : mixed
Parameters
- $string : mixed
- $flags : mixed = false
- $encoding : mixed = ''
- $doubleEncode : mixed = true
Return values
mixed —htmlEntityDecodeWrapper()
public
htmlEntityDecodeWrapper(mixed $string[, mixed $flags = false ][, mixed $encoding = '' ]) : mixed
Parameters
- $string : mixed
- $flags : mixed = false
- $encoding : mixed = ''
Return values
mixed —write()
Save (insert/update) an email record.
public
write(EmailInterface $email) : mixed
Parameters
- $email : EmailInterface
-
E-Mail.
Return values
mixed —_insert()
Inserts an email record to the database.
protected
_insert(EmailInterface $email) : mixed
Parameters
- $email : EmailInterface
-
E-Mail.
Return values
mixed —_update()
Updates an email record from the database.
protected
_update(EmailInterface $email) : mixed
Parameters
- $email : EmailInterface
-
E-Mail.
Return values
mixed —_writeContactsAndAttachments()
Writes email contacts and attachments.
protected
_writeContactsAndAttachments(EmailInterface $email) : mixed
It will delete old records (if exist) and re-insert them so that the data state will represent the object state.
Parameters
- $email : EmailInterface
-
Contains the email information.