Interface EmailRepositoryInterface
Interface EmailRepositoryInterface
Methods summary
public
write( EmailInterface $email )
Writes an email record into the database.
Writes an email record into the database.
Parameters
$email
- Contains the email information.
public
getById( IdType $id )
: EmailInterface
Returns an email record by ID.
Returns an email record by ID.
Parameters
$id
- Database ID of the record to be returned.
Returns
public
findById( IdType $id )
: EmailInterface|null
Find email by ID
This method will try to find the email record that matches provided ID and
will return NULL on when the record does not exist.
Parameters
$id
- Email record id to be found.
Returns
public
getPending( void )
: EmailCollection
Returns a collection of pending emails.
Returns a collection of pending emails.
Returns
public
getSent( void )
: EmailCollection
Returns a collection of sent emails.
Returns a collection of sent emails.
Returns
public
getAll( void )
: EmailCollection
Returns all email records from the database.
Returns all email records from the database.
Returns
public
delete( EmailInterface $email )
Removes all information of an email record from the database.
Removes all information of an email record from the database.
This method will remove ALL the email information, from the tables that
contain information about the specified email.
Parameters
$email
- Contains the email information.
public
filter( string $p_keyword, array $limit = array(), array $order = array() )
: EmailCollection
Filter email records with provided keyword string.
Filter email records with provided keyword string.
Parameters
$p_keyword
- String to be used for filtering the email records.
$limit
(optional) Array that contains LIMIT and OFFSET value
e.g. array( 'limit' => 10, 'offset' => 5 )
$order
(optional) Contains arrays with column, direction pairs
e.g. array( 'column' => 'direction' )
Returns
public
getRecordCount( string $p_filterKeyword = '' )
: integer
Get the current count of the email records in the database.
Get the current count of the email records in the database.
Parameters
$p_filterKeyword
- (optional) If provided the records will be filtered.
Returns
integer
Returns the row number of the email table.
public
deleteEmailsByEmailAddress( CustomerEmail $email )
Removes all emails from the data base that have the given email address as sender or recipient.
Removes all emails from the data base that have the given email address as sender or recipient.
Parameters
public
getEmailsByEmailAddress( CustomerEmail $email )
: EmailCollection
Gets all emails from the data base that have the given email address as sender or recipient.
Gets all emails from the data base that have the given email address as sender or recipient.
Parameters
Returns