CustomerReaderInterface
in
Interface CustomerReaderInterface
Tags
Table of Contents
- filterCustomers() : array<string|int, mixed>
- Filters customer records and returns an array with results.
- findById() : Customer|null
- Finds a customer by the given ID.
- findGuestByEmail() : Customer|null
- Finds a guest by email address.
- findRegistreeByEmail() : Customer|null
- Finds a registree by email address.
- getFilterCustomersCount() : int
- Filters customer records and returns the total count.
- searchCustomers() : array<string|int, mixed>
- Filters customer records by a given CustomerSearchCondition object and returns an array with results.
Methods
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.
findById()
Finds a customer by the given ID.
public
findById(IdType $id) : Customer|null
Parameters
- $id : IdType
-
Customer's ID.
Return values
Customer|null —Customer or null if not found.
findGuestByEmail()
Finds a guest by email address.
public
findGuestByEmail(CustomerEmailInterface $email) : Customer|null
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
Return values
Customer|null —Customer or null if not found.
findRegistreeByEmail()
Finds a registree by email address.
public
findRegistreeByEmail(CustomerEmailInterface $email) : Customer|null
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
Return values
Customer|null —Customer or null if not found.
getFilterCustomersCount()
Filters customer records and returns the total count.
public
getFilterCustomersCount([array<string|int, mixed> $conditions = [] ]) : int
Example: $reader->filterCustomers( array('customers_id' => 1) );
Parameters
- $conditions : array<string|int, mixed> = []
-
Associative array containing the desired field and value.
Return values
int —Returns the total customers count.
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.