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
EmailInterface
|
#
getById( IdType $id )
Returns an email record by ID.
Returns an email record by ID.
Parameters
- $id
- Database ID of the record to be returned.
Returns
|
public
EmailInterface |null
|
#
findById( IdType $id )
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
EmailCollection
|
#
getPending( )
Returns a collection of pending emails.
Returns a collection of pending emails.
Returns
|
public
EmailCollection
|
#
getSent( )
Returns a collection of sent emails.
Returns a collection of sent emails.
Returns
|
public
EmailCollection
|
#
getAll( )
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
EmailCollection
|
#
filter( string $p_keyword, array $limit = array(), array $order = array() )
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
integer
|
#
getRecordCount( string $p_filterKeyword = '' )
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.
|