Class CustomerRepository

Class CustomerRepository

This class contains basic methods for finding, creating and deleting customer data

CustomerRepository implements CustomerRepositoryInterface
Package: Customer
Category: System
Implements: CustomerRepositoryInterface
Located at Services/Core/Customer/CustomerRepository.inc.php

Methods summary

public __construct( CustomerWriterInterface $customerWriter, CustomerReaderInterface $customerReader, CustomerDeleterInterface $customerDeleter, CustomerAddressRepositoryInterface $customerAddressRepository, AbstractCustomerFactory $customerFactory, AddonValueServiceInterface $addonValueService )

Constructor of the class CustomerRepository.

public getNewCustomer( void ) : Customer

Creates a new customer.

public store( CustomerInterface $customer )

Stores customer data in the database.

public getCustomerById( IdType $customerId ) : CustomerInterface

Finds customer data by an ID.

public getRegistreeByEmail( CustomerEmailInterface $email ) : Customer|null

Finds a registered customer based on the e-mail address.

public deleteCustomerById( IdType $customerId )

Deletes the customer by the ID.

public deleteGuestByEmail( CustomerEmailInterface $email )

Deletes a guest account by its email address.

public getGuestByEmail( CustomerEmailInterface $email ) : Customer|null

Returns a guest account by its email address.

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 $customerWriter : CustomerWriterInterface

Customer writer.


		
protected $customerReader : CustomerReaderInterface

Customer reader.


		
protected $customerDeleter : CustomerDeleterInterface

Customer deleter.


		
protected $customerAddressRepository : CustomerAddressRepositoryInterface

Customer address repository.


		
protected $customerFactory : AbstractCustomerFactory

Customer factory.