CustomerAddonValueStorage

Extends \AbstractAddonValueStorage

Class CustomerAddonValueStorage

category

System

package

Customer

subpackage

Storages

Methods

AbstractAddonValueStorage Constructor

__construct(\CI_DB_query_builder $db) 
inherited

Arguments

$db

\CI_DB_query_builder

Get the container class type.

_getContainerType() : string
inherited abstract

Response

string

Should return a multidimensional array of database tables with corresponding primary keys and the column names with the corresponding key used in the KeyValueCollection which are relevant for addon values and not stored in the addon_values_storage table.

_getExternalFieldsArray() : array
inherited abstract

Example: $externalFields = array(); $externalFields['orders']['primary_key'] = 'orders_id'; $externalFields['orders']['fields'] = array( 'customers_ip' => 'customerIp', 'abandonment_download' => 'downloadAbandonmentStatus', 'abandonment_service' => 'serviceAbandonmentStatus', 'cc_type' => 'ccType', 'cc_owner' => 'ccOwner', 'cc_number' => 'ccNumber', 'cc_expires' => 'ccExpires', 'cc_start' => 'ccStart', 'cc_issue' => 'ccIssue', 'cc_cvv' => 'ccCvv' );

return $externalFields;

Response

array

Selects the fields specified in the external fields array $this->externalFields by the given container ID and returns the associative array which will be merged with the associative array with values from the addon_values_storage table.

_getExternalValuesByContainerId(\IdType $containerId) : array
inherited

Arguments

$containerId

\IdType

Response

array

Associative array of

Updates the fields specified in the external fields array $this->externalFields with the corresponding values from the provided KeyValueCollection and removes the elements from the collection before the called method writes into the addon_values_storage table.

_setExternalValues(\IdType $containerId, \KeyValueCollection $values) 
inherited

Arguments

$containerId

\IdType

Remove addon values by the given source id.

deleteValuesByContainerId(\IdType $containerId) : \AbstractAddonValueStorage
inherited

Arguments

$containerId

\IdType

Id of expected source.

Response

\AbstractAddonValueStorage

Returns the class instance.

Get the addon values by the given container ID.

getValuesByContainerId(\IdType $containerId) : \KeyValueCollection
inherited

Arguments

$containerId

\IdType

Container database ID.

Response

\KeyValueCollection

Sets addon values to the database.

setValues(\IdType $containerId, \KeyValueCollection $values) : \AbstractAddonValueStorage
inherited

Arguments

$containerId

\IdType

Container database ID.

$values

\KeyValueCollection

KeyValueCollection which should set.

Response

\AbstractAddonValueStorage

Returns the class instance.

Properties

db

db : \CI_DB_query_builder
inherited
var

Type(s)

\CI_DB_query_builder

Multidimensional array of database tables with corresponding primary keys and the fields which are relevant for addon values which are not stored in the addon_values_storage table.

externalFields : array
inherited
var

Multidimensional array of database tables with corresponding primary keys and the fields which are relevant for addon values which are not stored in the addon_values_storage table.

Type(s)

array