CustomerAddressReader

Extends \AbstractDataPaginator Implements \CustomerAddressReaderInterface

Class CustomerAddressReader

This class is used for reading customer address data from the database

category

System

package

Customer

subpackage

Address

implements

CustomerAddressReaderInterface

Methods

ManufacturerReader constructor.

__construct(\CI_DB_query_builder $query_builder) 
inherited

Arguments

$query_builder

\CI_DB_query_builder

Translate an order by sql instruction into a array of Sorter

_translateOrderByStringIntoArrayOfSorter(\StringType|null $orderBy = null) : array
inherited

Arguments

$orderBy

\StringType|null

SQL instruction with fields to sort.

Response

array

of Sorter objects.

Filter existing addresses by keyword.

filterAddresses(string $p_keyword, \Pager|null $pager = null, array $sorters = array()) : array

This method is useful when creating a search mechanism for the registered addresses.

Arguments

$p_keyword

string

The keyword to be used for filtering the records.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

array

Returns an array of CustomerAddress objects.

This method will return an array of all customer's addresses

findAddressesByCustomer(\CustomerInterface $customer) : array

Arguments

$customer

\CustomerInterface

Response

array

containing CustomerAddress objects

Method to find a customer address with a given ID if it exits else it will return null

findById(\IdType $id) : \CustomerAddress

Arguments

$id

\IdType

Response

\CustomerAddress

Get all system addresses.

getAllAddresses(\Pager|null $pager = null, array $sorters = array()) : array

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

array

of CustomerAddress

getById

getById(\IdType $id) : \CustomerAddress
Throws
\InvalidArgumentException

Arguments

$id

\IdType

Response

\CustomerAddress

Properties