Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory

Class AbstractAddonValueStorage

Class AbstractAddonValueStorage

Direct known subclasses

CategoryAddonValueStorage, OrderAddonValueStorage, OrderItemAddonValueStorage, ProductAddonValueStorage

Abstract
Package: AddonValue
Category: System
Located at SystemServices/AddonValue/AbstractAddonValueStorage.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db )

AbstractAddonValueStorage Constructor

AbstractAddonValueStorage Constructor

Parameters

$db
public KeyValueCollection
# getValuesByContainerId( IdType $containerId )

Get the addon values by the given container ID.

Get the addon values by the given container ID.

Parameters

$containerId
Container database ID.

Returns

KeyValueCollection
public AbstractAddonValueStorage
# setValues( IdType $containerId, KeyValueCollection $values )

Sets addon values to the database.

Sets addon values to the database.

Parameters

$containerId
Container database ID.
$values
KeyValueCollection which should set.

Returns

AbstractAddonValueStorage
Returns the class instance.
protected array
# _getExternalValuesByContainerId( IdType $containerId )

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.

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.

Parameters

$containerId

Returns

array
Associative array of
protected
# _setExternalValues( IdType $containerId, KeyValueCollection $values )

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.

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.

Parameters

$containerId
$values
public AbstractAddonValueStorage
# deleteValuesByContainerId( IdType $containerId )

Remove addon values by the given source id.

Remove addon values by the given source id.

Parameters

$containerId
Id of expected source.

Returns

AbstractAddonValueStorage
Returns the class instance.
abstract protected array
# _getExternalFieldsArray( )

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.

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.

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;

Returns

array
abstract protected string
# _getContainerType( )

Get the container class type.

Get the container class type.

Returns

string

Properties summary

protected CI_DB_query_builder $db
#
protected array $externalFields

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.

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.

# array()
API documentation generated by ApiGen