From a24266a56ad6d3891430740ae23d807998e5d265 Mon Sep 17 00:00:00 2001 From: "alexandr.titov" Date: Thu, 26 May 2022 14:33:39 +0300 Subject: [PATCH] wl-36389: [EXP] Add info about available sessions to SDK model of intro offers --- WellnessLiving/Config/WlConfigAbstract.php | 8 ++++---- WellnessLiving/Config/WlConfigDeveloper.php | 2 +- WellnessLiving/Config/WlConfigProduction.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WellnessLiving/Config/WlConfigAbstract.php b/WellnessLiving/Config/WlConfigAbstract.php index ed02e552..4f70fe5d 100644 --- a/WellnessLiving/Config/WlConfigAbstract.php +++ b/WellnessLiving/Config/WlConfigAbstract.php @@ -86,7 +86,7 @@ abstract class WlConfigAbstract * @see \WellnessLiving\Config\WlConfigProduction * @see \WellnessLiving\Config\WlConfigDeveloper */ - protected const REGION_URL=null; + protected $REGION_URL=null; /** * List of rules, which is used to convert error codes to HTTP codes. @@ -206,7 +206,7 @@ final public static function create(int $id_region): WlConfigAbstract 'text_message' => 'The COOKIE_PERSISTENT constant is not set. Use the correct parent class: WlConfigDeveloper or WlConfigProduction.' ]); - WlAssertException::assertTrue(is_array(static::REGION_URL),[ + WlAssertException::assertTrue(is_array(static::$REGION_URL),[ 'text_class' => static::class, 'text_message' => 'The REGION_URL constant is not set. Use the correct parent class: WlConfigDeveloper or WlConfigProduction.' ]); @@ -218,7 +218,7 @@ final public static function create(int $id_region): WlConfigAbstract 'text_message' => 'Region does not exist. Please enter the correct region from "\WellnessLiving\WlRegionSid" class.' ]); - WlAssertException::assertTrue(isset(static::REGION_URL[$id_region]),[ + WlAssertException::assertTrue(isset(static::$REGION_URL[$id_region]),[ 'text_class' => static::class, 'text_message' => 'The URL endpoint API is not set for the requested data center region id. Let the developers know about it.' ]); @@ -249,6 +249,6 @@ final public function csrfCode(string $s_session_key): string */ final public function url(): string { - return static::REGION_URL[$this->id_region]; + return static::$REGION_URL[$this->id_region]; } } \ No newline at end of file diff --git a/WellnessLiving/Config/WlConfigDeveloper.php b/WellnessLiving/Config/WlConfigDeveloper.php index 2a5b4cac..16c9b890 100644 --- a/WellnessLiving/Config/WlConfigDeveloper.php +++ b/WellnessLiving/Config/WlConfigDeveloper.php @@ -27,7 +27,7 @@ abstract class WlConfigDeveloper extends WlConfigAbstract /** * @inheritDoc */ - protected const REGION_URL = [ + protected $REGION_URL = [ WlRegionSid::AP_SOUTHEAST_2 => 'https://demo.wellnessliving.com/', WlRegionSid::US_EAST_1 => 'https://staging.wellnessliving.com/', ]; diff --git a/WellnessLiving/Config/WlConfigProduction.php b/WellnessLiving/Config/WlConfigProduction.php index d1e64b1d..9987f196 100644 --- a/WellnessLiving/Config/WlConfigProduction.php +++ b/WellnessLiving/Config/WlConfigProduction.php @@ -22,7 +22,7 @@ abstract class WlConfigProduction extends WlConfigAbstract /** * @inheritDoc */ - protected const REGION_URL = [ + protected $REGION_URL = [ WlRegionSid::AP_SOUTHEAST_2 => 'https://au.wellnessliving.com/', WlRegionSid::US_EAST_1 => 'https://us.wellnessliving.com/', ];