CustomerAddressReader

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

Constructor for the class CustomerAddressReader

__construct(\AbstractCustomerFactory $customerFactory, \CountryServiceInterface $countryService, \CI_DB_query_builder $dbQueryBuilder) 

CrossCuttingLoader dependencies:

  • StringHelper

Arguments

$customerFactory

\AbstractCustomerFactory

$countryService

\CountryServiceInterface

$dbQueryBuilder

\CI_DB_query_builder

_createCustomerAddressByArray

_createCustomerAddressByArray(array $addressDataArray) : \CustomerAddress

Arguments

$addressDataArray

array

Response

\CustomerAddress

Filter existing addresses by keyword.

filterAddresses(string $p_keyword) : 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.

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() 

getById

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

Arguments

$id

\IdType

Response

\CustomerAddress

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

customerFactory

customerFactory : \AbstractCustomerFactory

countryService

countryService : \CountryServiceInterface

stringHelper

stringHelper : \StringHelperInterface