Class CustomerReader
This class is used for reading customer data from the database
category |
System |
---|---|
package |
Customer |
implements |
CustomerReaderInterface |
__construct(\AbstractCustomerFactory $customerFactory, \CustomerAddressRepositoryInterface $customerAddressRepository, \CI_DB_query_builder $dbQueryBuilder)
CrossCuttingLoader dependencies:
\CI_DB_query_builder
Query builder.
_createCustomerByArray(array $customerDataArray) : \Customer
todo |
If date of birth is null in the database then: $customerDataArray['customers_dob'] = '0000-00-00 00:00:00' and then the getDateOfBirth() will return wrong results ($customer->getDateOfBirth() >> -0001-11-30 00:00:00). |
---|
array
Customer data.
\Customer
$customer Created customer.
_findByFilter(array $filterArray) : \Customer|null
filterCustomers(array $conditions = array(), integer $limit = null, integer $offset = null) : array
Example: $reader->filterCustomers( array('customers_id' => 1) );
array
Associative array containing the desired field and value.
integer
MySQL limit index.
integer
Number of records to be returned.
array
Returns an array that contains customer objects.
findById(\IdType $id) : \Customer|null
findGuestByEmail(\CustomerEmailInterface $email) : \Customer|null
findRegistreeByEmail(\CustomerEmailInterface $email) : \Customer|null
getFilterCustomersCount(array $conditions = array()) : integer
Example: $reader->filterCustomers( array('customers_id' => 1) );
array
Associative array containing the desired field and value.
integer
Returns the total customers count.
searchCustomers(\CustomerSearchCondition $condition, \Pager $pager) : array
array
Returns an array that contains customer objects.
db : \CI_DB_query_builder
var |
---|
\CI_DB_query_builder
customerAddressRepository : \CustomerAddressRepositoryInterface
isGuest : boolean
var |
---|
boolean