diff --git a/Core/Session.php b/Core/Session.php index b2f569295..3089f85e5 100644 --- a/Core/Session.php +++ b/Core/Session.php @@ -58,7 +58,10 @@ final function offsetUnset($k) {$this->_st->offsetUnset($this->k($k));} * 2021-10-26 * @used-by s() */ - private function __construct() {$this->_st = df_o($this->c());} + private function __construct() { + $this->_prefix = df_class_flc($this); + $this->_st = df_o($this->c()); + } /** * 2021-10-26 @@ -69,7 +72,15 @@ private function __construct() {$this->_st = df_o($this->c());} * @param string $k [optional] * @return string */ - private function k($k) {return "df_$k";} + private function k($k) {return "{$this->_prefix}_$k";} + + /** + * 2021-10-27 + * @used-by __construct() + * @used-by k() + * @var string + */ + private $_prefix; /** * 2021-10-26 diff --git a/Core/lib/reflection/main.php b/Core/lib/reflection/main.php index 84720dc06..1d9687d14 100644 --- a/Core/lib/reflection/main.php +++ b/Core/lib/reflection/main.php @@ -65,12 +65,22 @@ function df_class_exists($c) {$c = df_ctr($c); return @class_exists($c);} * 2016-01-01 * 2016-10-20 * Making $c optional leads to the error «get_class() called without object from outside a class»: https://3v4l.org/k6Hd5 + * @used-by df_class_flc() * @used-by df_class_my() * @param string|object $c * @return string */ function df_class_f($c) {return df_first(df_explode_class($c));} +/** + * 2021-10-27 + * @see df_class_llc() + * @used-by \Df\Core\Session::__construct() + * @param string|object $c + * @return string + */ +function df_class_flc($c) {return strtolower(df_class_f($c));} + /** * 2017-01-10 * @uses df_cts() отсекает окончание «\Interceptor»: без этого функция работала бы не так, как мы хотим diff --git a/composer.json b/composer.json index 1c8c7a1f9..b75e81516 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/core" - ,"version": "7.8.6" + ,"version": "7.8.7" ,"description": "Mage2.PRO core package." ,"type": "magento2-module" ,"homepage": "https://mage2.pro"