phpDocumentor

CustomerRepository

Interface CustomerRepository

Table of Contents

deleteCustomers()  : void
Deletes customers based on the given customer IDs.
deleteOutdatedGuestAccounts()  : void
Deletes all outdated guests customers (the ones without an active session).
filterCustomers()  : Customers
Returns a filtered and paginated collection of customers based on the given filter and sorting arguments.
getCustomerById()  : Customer
Returns a specific customer based on the given ID.
getCustomers()  : Customers
Returns all available customers.
getCustomersTotalCount()  : int
Returns total count of customers based on the given filter arguments.
getGuestAccounts()  : Customers
Returns all available customers that are guest accounts.
getSearchedCustomerTotalCount()  : int
Returns total count of customers based on the given search object.
searchCustomers()  : Customers
Returns a paginated collection of customers based on the given search term and sorting arguments.
storeCustomers()  : void
Stores multiple customers.
validateEmailAddress()  : true
Checks if an email address is valid in its self or is already taken by another customer

Methods

deleteOutdatedGuestAccounts()

Deletes all outdated guests customers (the ones without an active session).

public deleteOutdatedGuestAccounts() : void
Return values
void

filterCustomers()

Returns a filtered and paginated collection of customers based on the given filter and sorting arguments.

public filterCustomers(CustomerFilters $filters, CustomerSorting $sorting, Pagination $pagination) : Customers

The filters must be a map, that assigns an attribute its filtering pattern. The sorting must be a comma-separated list of attributes. A - can be used to change the order to descending.

Parameters
$filters : CustomerFilters
$sorting : CustomerSorting
$pagination : Pagination
Return values
Customers

getCustomersTotalCount()

Returns total count of customers based on the given filter arguments.

public getCustomersTotalCount(CustomerFilters $filters) : int

The filters must be a map, that assigns an attribute it's filtering pattern.

Parameters
$filters : CustomerFilters
Return values
int

getSearchedCustomerTotalCount()

Returns total count of customers based on the given search object.

public getSearchedCustomerTotalCount(CustomerSearch $searchTerm) : int
Parameters
$searchTerm : CustomerSearch
Return values
int

Search results