-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TE-9834: Dynamic multi-store: global objects cleanup for Yves (#2061)
TE-9834 Dynamic Store Configuration (Cleanup + Deprecation)
- Loading branch information
Dmytro Dymarchuk
authored
Oct 29, 2021
1 parent
96a5a4b
commit ceed587
Showing
6 changed files
with
89 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...prykerShop/Yves/ShopApplication/Dependency/Client/ShopApplicationToLocaleClientBridge.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerShop\Yves\ShopApplication\Dependency\Client; | ||
|
||
class ShopApplicationToLocaleClientBridge implements ShopApplicationToLocaleClientInterface | ||
{ | ||
/** | ||
* @var \Spryker\Client\Locale\LocaleClientInterface | ||
*/ | ||
protected $localeClient; | ||
|
||
/** | ||
* @param \Spryker\Client\Locale\LocaleClientInterface $localeClient | ||
*/ | ||
public function __construct($localeClient) | ||
{ | ||
$this->localeClient = $localeClient; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCurrentLocale() | ||
{ | ||
return $this->localeClient->getCurrentLocale(); | ||
} | ||
|
||
/** | ||
* @return array<string> | ||
*/ | ||
public function getLocales(): array | ||
{ | ||
return $this->localeClient->getLocales(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...kerShop/Yves/ShopApplication/Dependency/Client/ShopApplicationToLocaleClientInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerShop\Yves\ShopApplication\Dependency\Client; | ||
|
||
interface ShopApplicationToLocaleClientInterface | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getCurrentLocale(); | ||
|
||
/** | ||
* @return array<string> | ||
*/ | ||
public function getLocales(): array; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters