Class EmailReader
Reads email records from the database. This class provides a customizable interface for reading operations so that it is possible to build different variations in the EmailRepository class (e.g. "getPending", "findById", "getAll").
category |
System |
---|---|
package |
|
subpackage |
Repository |
__construct(\CI_DB_query_builder $db, \EmailFactoryInterface $factory)
\CI_DB_query_builder
Will be used for database operations.
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.
get(array $conditions = array(), array $limit = array(), array $order = array()) : \EmailCollection
Example: $reader->get(array('email_id' => $customerId), 10, array( array('email_id', 'asc') ));
array
(optional) Contains conditions with column => value pairs.
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.
getRecordCount(string $p_filterKeyword = '') : integer
This method will quickly return the record count of the "emails" table. It must be used when we just need the number and not the data, because the "get" or "find" methods need more time to load and parse the records.
Throws |
|
---|
string
(optional) If provided the records will be filtered.
integer
Returns the row number of the email table.
htmlentitiesWrapper( $string, $flags = false, $encoding = '', $doubleEncode = true)
htmlEntityDecodeWrapper( $string, $flags = false, $encoding = '')