Class CustomerWriter
Class CustomerWriter
This class is used for writing customer data to the database
-
CustomerWriter
implements
CustomerWriterInterface
Methods summary
public
|
#
__construct( CI_DB_query_builder $dbQueryBuilder )
Constructor of the class CustomerWriter.
Constructor of the class CustomerWriter.
Parameters
- $dbQueryBuilder
- Query builder.
|
public
|
#
write( CustomerInterface $customer )
Writes customer data.
If customer does not exists it will perform an _insert(), otherwise it will perform an _update().
Parameters
Implementation of
|
protected
|
#
_insert( CustomerInterface $customer )
Helper method to insert customer data into the database.
Helper method to insert customer data into the database.
Parameters
Throws
InvalidArgumentException If CIDB_query_builder::insert_id does not return an integer.
|
protected
|
#
_update( CustomerInterface $customer )
Helper method to update customer data in the database.
Helper method to update customer data in the database.
Parameters
- $customer
Customer.
TODO Use wrapper function getDefaultAddressId() instead of getDefaultAddress()->getId()
|
Properties summary
protected
CI_DB_query_builder
|
$db
|
|