phpDocumentor

CustomerReader

Class CustomerReader

Table of Contents

$connection  : Connection
__construct()  : mixed
createQuery()  : QueryBuilder
emailAddressIsAlreadyTaken()  : bool
getCustomerById()  : array<string|int, mixed>
Returns a specific customer based on the given ID.
getCustomers()  : array<string|int, mixed>
getCustomerTotalCount()  : int
getFilteredCustomers()  : array<string|int, mixed>
getSearchedCustomerTotalCount()  : int
searchCustomers()  : array<string|int, mixed>
Returns a paginated collection of customers based on the given search term and sorting arguments.

Properties

Methods

__construct()

public __construct(Connection $connection) : mixed
Parameters
$connection : Connection
Return values
mixed

createQuery()

public createQuery() : QueryBuilder
Return values
QueryBuilder

emailAddressIsAlreadyTaken()

public emailAddressIsAlreadyTaken(string $email) : bool
Parameters
$email : string
Return values
bool

getCustomers()

public getCustomers([bool $areGuestAccounts = false ]) : array<string|int, mixed>
Parameters
$areGuestAccounts : bool = false
Return values
array<string|int, mixed>

searchCustomers()

Returns a paginated collection of customers based on the given search term and sorting arguments.

public searchCustomers(CustomerSearch|CustomerSearch $searchTerm, CustomerSorting $sorting, Pagination|SqlPagination $pagination) : array<string|int, mixed>

The sorting must be a comma-separated list of attributes. A - can be used to change the order to descending.

Parameters
$searchTerm : CustomerSearch|CustomerSearch
$sorting : CustomerSorting
$pagination : Pagination|SqlPagination
Return values
array<string|int, mixed>

Search results