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_builderQuery 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). |
|---|
arrayCustomer 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) );
arrayAssociative array containing the desired field and value.
integerMySQL limit index.
integerNumber of records to be returned.
arrayReturns 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) );
arrayAssociative array containing the desired field and value.
integerReturns the total customers count.
searchCustomers(\CustomerSearchCondition $condition, \Pager $pager) : array
arrayReturns an array that contains customer objects.
db : \CI_DB_query_builder
| var |
|---|
\CI_DB_query_builder
customerAddressRepository : \CustomerAddressRepositoryInterface
isGuest : boolean
| var |
|---|
boolean