CustomerAddressRepository

Implements \CustomerAddressRepositoryInterface

Class CustomerAddressRepository

This class contains basic methods for finding, creating and deleting customer addresses

category

System

package

Customer

subpackage

Address

implements

CustomerAddressRepositoryInterface

Methods

Constructor of the class CustomerAddressRepository

__construct(\CustomerAddressWriterInterface $customerAddressWriter, \CustomerAddressDeleterInterface $customerAddressDeleter, \CustomerAddressReaderInterface $customerAddressReader, \AbstractCustomerFactory $customerFactory) 

Arguments

$customerAddressWriter

\CustomerAddressWriterInterface

$customerAddressDeleter

\CustomerAddressDeleterInterface

$customerAddressReader

\CustomerAddressReaderInterface

$customerFactory

\AbstractCustomerFactory

Method to delete a customer address

deleteCustomerAddress(\CustomerAddressInterface $address) 

Arguments

Deletes the customer address

deleteCustomerAddressesByCustomer(\CustomerInterface $customer) 

Arguments

$customer

\CustomerInterface

Filter existing address records by provided string.

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

Arguments

$p_keyword

string

$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.

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

findById(\IdType $addressBookId) : \CustomerAddress

Arguments

$addressBookId

\IdType

Response

\CustomerAddress

Get all registered address records.

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

Returns an array of CustomerAddress objects.

Method to get a customer address with a given ID

getById(\IdType $addressBookId) : \CustomerAddress

Arguments

$addressBookId

\IdType

Response

\CustomerAddress

Gets all customer addresses

getCustomerAddresses(\CustomerInterface $customer) : array

Arguments

$customer

\CustomerInterface

Response

array

of CustomerAddress objects

getNewAddress

getNewAddress() : \CustomerAddress

Response

\CustomerAddress

Stores the customer address

store(\CustomerAddressInterface $address) : \CustomerAddressInterface

Properties

customerAddressWriter

customerAddressWriter : \CustomerAddressWriterInterface

customerAddressDeleter

customerAddressDeleter : \CustomerAddressDeleterInterface

customerAddressReader

customerAddressReader : \CustomerAddressReaderInterface

customerFactory

customerFactory : \AbstractCustomerFactory