Class EmailRepository
Handles the database operations that concern the email records of the database. It provides a layer for more complicated methods that use the writer, reader and deleter.
category |
System |
---|---|
package |
|
subpackage |
Repository |
__construct(\EmailWriterInterface $writer, \EmailReaderInterface $reader, \EmailDeleterInterface $deleter)
delete(\EmailInterface $email)
This method will remove ALL the email information, from the tables that contain information about the specified email.
deleteEmailsByEmailAddress(\CustomerEmail $email)
deleteOldEmailsByDate(\DateTime $date)
\DateTime
filter(string $p_keyword, array $limit = array(), array $order = array()) : \EmailCollection
string
String to be used for filtering the email records.
array
(optional) Array that contains LIMIT and OFFSET value e.g. array( 'limit' => 10, 'offset' => 5 )
array
(optional) Contains arrays with column, direction pairs e.g. array( 'column' => 'direction' )
\EmailCollection
Returns a collection containing the email records.
findById(\IdType $id) : \EmailInterface|null
This method will try to find the email record that matches provided ID and will return NULL on when the record does not exist.
\EmailInterface|null
Returns email object or null on failure.
getAll() : \EmailCollection
getById(\IdType $id) : \EmailInterface
Throws |
|
---|
\EmailInterface
Returns the email object that matches the ID.
getEmailsByEmailAddress(\CustomerEmail $email) : \EmailCollection
getPending() : \EmailCollection
getRecordCount(string $p_filterKeyword = '') : integer
string
(optional) If provided the records will be filtered.
integer
Returns the row number of the email table.
getSent() : \EmailCollection
write(\EmailInterface $email)