1 | <?php |
||
34 | class Base extends \Magento\Framework\App\Helper\AbstractHelper |
||
35 | { |
||
36 | /** |
||
37 | * Store manager object |
||
38 | * |
||
39 | * @var \Magento\Store\Model\StoreManagerInterface |
||
40 | */ |
||
41 | protected $storeManager; |
||
42 | |||
43 | /** |
||
44 | * PAYONE shop helper |
||
45 | * |
||
46 | * @var \Payone\Core\Helper\Shop |
||
47 | */ |
||
48 | protected $shopHelper; |
||
49 | |||
50 | /** |
||
51 | * Constructor |
||
52 | * |
||
53 | * @param \Magento\Framework\App\Helper\Context $context |
||
54 | * @param \Magento\Store\Model\StoreManagerInterface $storeManager |
||
55 | * @param \Payone\Core\Helper\Shop $shopHelper |
||
56 | */ |
||
57 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * Helper method to get parameter from the config |
||
69 | * divided by the config path elements |
||
70 | * |
||
71 | * @param string $sKey |
||
72 | * @param string $sGroup |
||
73 | * @param string $sSection |
||
74 | * @param string $sStoreCode |
||
75 | * @return string |
||
76 | */ |
||
77 | public function getConfigParam($sKey, $sGroup = 'global', $sSection = 'payone_general', $sStoreCode = null) |
||
85 | |||
86 | /** |
||
87 | * Get a certain config param for all available stores |
||
88 | * |
||
89 | * @param string $sKey |
||
90 | * @param string $sGroup |
||
91 | * @param string $sSection |
||
92 | * @return array |
||
93 | */ |
||
94 | public function getConfigParamAllStores($sKey, $sGroup = 'global', $sSection = 'payone_general') |
||
106 | |||
107 | /** |
||
108 | * Get parameter from the request |
||
109 | * |
||
110 | * @param string $sParameter |
||
111 | * @return mixed |
||
112 | */ |
||
113 | public function getRequestParameter($sParameter) |
||
117 | |||
118 | /** |
||
119 | * Handle the serialization of strings depending on the Magento version |
||
120 | * |
||
121 | * @param mixed $mValue |
||
122 | * @return string |
||
123 | */ |
||
124 | public function serialize($mValue) { |
||
130 | |||
131 | /** |
||
132 | * @param string $sValue |
||
133 | * @return mixed |
||
134 | */ |
||
135 | public function unserialize($sValue) { |
||
141 | } |
||
142 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: