CustomerRepositoryInterface
in
Interface CustomerRepositoryInterface
Tags
Table of Contents
- deleteGuestByEmail() : mixed
- Deletes a guest account by its email address.
- filterCustomers() : array<string|int, mixed>
- Filters customer records and returns an array with results.
- getFilterCustomersCount() : int
- Filters customer records and returns the total count.
- getGuestByEmail() : Customer|null
- Returns a guest account by its email address.
- getNewCustomer() : Customer
- Creates a new customer.
- getRegistreeByEmail() : Customer|null
- Finds a registered customer based on the e-mail address.
- searchCustomers() : array<string|int, mixed>
- Filters customer records by a given CustomerSearchCondition object and returns an array with results.
- store() : mixed
- Stores customer data in the database.
Methods
deleteGuestByEmail()
Deletes a guest account by its email address.
public
deleteGuestByEmail(CustomerEmailInterface $email) : mixed
Parameters
- $email : CustomerEmailInterface
-
Guest customer's E-Mail address.
Return values
mixed —filterCustomers()
Filters customer records and returns an array with results.
public
filterCustomers([array<string|int, mixed> $conditions = [] ][, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : array<string|int, mixed>
Example: $repository->filterCustomers('customers_id' => 1);
Parameters
- $conditions : array<string|int, mixed> = []
-
Associative array containing the desired field and value.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
array<string|int, mixed> —Returns an array that contains customer objects.
getFilterCustomersCount()
Filters customer records and returns the total count.
public
getFilterCustomersCount([array<string|int, mixed> $conditions = [] ]) : int
Example: $repository->filterCustomers('customers_id' => 1);
Parameters
- $conditions : array<string|int, mixed> = []
-
Associative array containing the desired field and value.
Return values
int —getGuestByEmail()
Returns a guest account by its email address.
public
getGuestByEmail(CustomerEmailInterface $email) : Customer|null
Parameters
- $email : CustomerEmailInterface
-
Guest customer's E-Mail address.
Return values
Customer|null —Customer or null if not found.
getNewCustomer()
Creates a new customer.
public
getNewCustomer() : Customer
Return values
Customer —Newly created customer.
getRegistreeByEmail()
Finds a registered customer based on the e-mail address.
public
getRegistreeByEmail(CustomerEmailInterface $email) : Customer|null
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
Return values
Customer|null —Customer or null if not found.
searchCustomers()
Filters customer records by a given CustomerSearchCondition object and returns an array with results.
public
searchCustomers(CustomerSearchCondition $condition[, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : array<string|int, mixed>
Parameters
- $condition : CustomerSearchCondition
-
Conditions object for search.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
array<string|int, mixed> —Returns an array that contains customer objects.
store()
Stores customer data in the database.
public
store(CustomerInterface $customer) : mixed
Parameters
- $customer : CustomerInterface
-
Customer.