1 <?php
2
3 /* --------------------------------------------------------------
4 OrderAddonValueStorage.inc.php 2015-12-17
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 MainFactory::load_class('AbstractAddonValueStorage');
14
15 /**
16 * Class OrderAddonValueStorage
17 *
18 * @category System
19 * @package Order
20 * @subpackage Storages
21 */
22 class OrderAddonValueStorage extends AbstractAddonValueStorage
23 {
24 /**
25 * Get the container class type.
26 *
27 * @return string
28 */
29 protected function _getContainerType()
30 {
31 return 'OrderInterface';
32 }
33
34
35 /**
36 * Returns a multidimensional array with the primary key of the orders table and the required column names with the
37 * corresponding key used in the KeyValueCollection.
38 *
39 * @return array
40 */
41 protected function _getExternalFieldsArray()
42 {
43 $externalFields = array();
44 $externalFields['orders']['primary_key'] = 'orders_id';
45 $externalFields['orders']['fields'] = array(
46 'customers_ip' => 'customerIp',
47 'abandonment_download' => 'downloadAbandonmentStatus',
48 'abandonment_service' => 'serviceAbandonmentStatus',
49 'cc_type' => 'ccType',
50 'cc_owner' => 'ccOwner',
51 'cc_number' => 'ccNumber',
52 'cc_expires' => 'ccExpires',
53 'cc_start' => 'ccStart',
54 'cc_issue' => 'ccIssue',
55 'cc_cvv' => 'ccCvv'
56 );
57
58 return $externalFields;
59 }
60 }