1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Product\Utils\CacheKeys |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import |
18
|
|
|
* @link http://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Product\Utils; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* A utility class that contains the cache keys. |
25
|
|
|
* |
26
|
|
|
* @author Tim Wagner <[email protected]> |
27
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
28
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
29
|
|
|
* @link https://github.com/techdivision/import |
30
|
|
|
* @link http://www.techdivision.com |
31
|
|
|
*/ |
32
|
|
|
class CacheKeys extends \TechDivision\Import\Utils\CacheKeys |
33
|
|
|
{ |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* The cache key for products. |
37
|
|
|
* |
38
|
|
|
* @var string |
39
|
|
|
*/ |
40
|
|
|
const PRODUCT = 'product'; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* The cache key for product varchar attributes. |
44
|
|
|
* |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
const PRODUCT_VARCHAR = 'product_varchar'; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* The cache key for product integer attributes. |
51
|
|
|
* |
52
|
|
|
* @var string |
53
|
|
|
*/ |
54
|
|
|
const PRODUCT_INT = 'product_int'; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* The cache key for product datetime attribute. |
58
|
|
|
* |
59
|
|
|
* @var string |
60
|
|
|
*/ |
61
|
|
|
const PRODUCT_DATETIME = 'product_datetime'; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* The cache key for product decimal attribute. |
65
|
|
|
* |
66
|
|
|
* @var string |
67
|
|
|
*/ |
68
|
|
|
const PRODUCT_DECIMAL = 'product_decimal'; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* The cache key for product text attribute. |
72
|
|
|
* |
73
|
|
|
* @var string |
74
|
|
|
*/ |
75
|
|
|
const PRODUCT_TEXT = 'product_text'; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Initializes the instance with the passed cache key. |
79
|
|
|
* |
80
|
|
|
* @param string $cacheKey The cache key use |
81
|
|
|
*/ |
82
|
|
|
public function __construct($cacheKey, array $cacheKeys = array()) |
83
|
|
|
{ |
84
|
|
|
|
85
|
|
|
// merge the passed cache keys with the one from this class |
86
|
|
|
$mergedCacheKeys = array_merge( |
87
|
|
|
array( |
88
|
|
|
CacheKeys::PRODUCT, |
89
|
|
|
CacheKeys::PRODUCT_VARCHAR, |
90
|
|
|
CacheKeys::PRODUCT_INT, |
91
|
|
|
CacheKeys::PRODUCT_DATETIME, |
92
|
|
|
CacheKeys::PRODUCT_DECIMAL, |
93
|
|
|
CacheKeys::PRODUCT_TEXT |
94
|
|
|
), |
95
|
|
|
$cacheKeys |
96
|
|
|
); |
97
|
|
|
|
98
|
|
|
// pass them to the parent instance |
99
|
|
|
parent::__construct($cacheKey, $mergedCacheKeys); |
|
|
|
|
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.