Class CustomerReader

Class CustomerReader

This class is used for reading customer data from the database

CustomerReader implements CustomerReaderInterface
Package: Customer
Category: System
Implements: CustomerReaderInterface
Located at Services/Core/Customer/CustomerReader.inc.php

Methods summary

public __construct( AbstractCustomerFactory $customerFactory, CustomerAddressRepositoryInterface $customerAddressRepository, CI_DB_query_builder $dbQueryBuilder )

Constructor of the class CustomerReader.

public findById( IdType $id ) : Customer|null

Finds a customer by the given ID.

public findRegistreeByEmail( CustomerEmailInterface $email ) : Customer|null

Finds a registree by email address.

public findGuestByEmail( CustomerEmailInterface $email ) : Customer|null

Finds a guest by email address.

protected _findByFilter( array $filterArray ) : Customer|null

Helper method which searches for user data based on an applied filter.

protected _createCustomerByArray( array $customerDataArray ) : Customer

Creates a customer based on the provided data.

public filterCustomers( array $conditions = [], integer $limit = null, integer $offset = null ) : array

Filters customer records and returns an array with results.

public getFilterCustomersCount( array $conditions = [] ) : integer

Filters customer records and returns the total count.

Properties summary

protected $db : CI_DB_query_builder

Query builder.


		
protected $customerFactory : AbstractCustomerFactory

Customer factory.


		
protected $customerAddressRepository : CustomerAddressRepositoryInterface

Customer address repository.


		
protected $stringHelper : StringHelperInterface

String helper.


		
protected $isGuest : boolean

Is customer a guest?