-
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.
FRW-6879 Added
IN
filter support for Data Exchange API. (#10852)
FRW-6879 Added `IN` filter support for Data Exchange API.
- Loading branch information
1 parent
369aa5d
commit 2892794
Showing
13 changed files
with
613 additions
and
93 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
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
56 changes: 56 additions & 0 deletions
56
...Spryker/Zed/DynamicEntity/Dependency/Service/DynamicEntityToUtilEncodingServiceBridge.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,56 @@ | ||
<?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 Spryker\Zed\DynamicEntity\Dependency\Service; | ||
|
||
use Spryker\Service\UtilEncoding\UtilEncodingServiceInterface; | ||
|
||
class DynamicEntityToUtilEncodingServiceBridge implements DynamicEntityToUtilEncodingServiceInterface | ||
{ | ||
/** | ||
* @var \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface | ||
*/ | ||
protected UtilEncodingServiceInterface $utilEncodingService; | ||
|
||
/** | ||
* @param \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface $utilEncodingService | ||
*/ | ||
public function __construct($utilEncodingService) | ||
{ | ||
$this->utilEncodingService = $utilEncodingService; | ||
} | ||
|
||
/** | ||
* @param array<mixed> $value | ||
* @param int|null $options | ||
* @param int|null $depth | ||
* | ||
* @return string|null | ||
*/ | ||
public function encodeJson(array $value, ?int $options = null, ?int $depth = null): ?string | ||
{ | ||
return $this->utilEncodingService->encodeJson($value, $options, $depth); | ||
} | ||
|
||
/** | ||
* @param string $jsonValue | ||
* @param bool $assoc Deprecated: `false` is deprecated, always use `true` for array return. | ||
* @param int|null $depth | ||
* @param int|null $options | ||
* | ||
* @return object|array<mixed>|null | ||
*/ | ||
public function decodeJson(string $jsonValue, bool $assoc = false, ?int $depth = null, ?int $options = null) | ||
{ | ||
if ($assoc === false) { | ||
trigger_error('Param #2 `$assoc` must be `true` as return of type `object` is not accepted.', E_USER_DEPRECATED); | ||
} | ||
|
||
/** @phpstan-var array<mixed>|null */ | ||
return $this->utilEncodingService->decodeJson($jsonValue, $assoc, $depth, $options); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...yker/Zed/DynamicEntity/Dependency/Service/DynamicEntityToUtilEncodingServiceInterface.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,30 @@ | ||
<?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 Spryker\Zed\DynamicEntity\Dependency\Service; | ||
|
||
interface DynamicEntityToUtilEncodingServiceInterface | ||
{ | ||
/** | ||
* @param array<mixed> $value | ||
* @param int|null $options | ||
* @param int|null $depth | ||
* | ||
* @return string|null | ||
*/ | ||
public function encodeJson(array $value, ?int $options = null, ?int $depth = null): ?string; | ||
|
||
/** | ||
* @param string $jsonValue | ||
* @param bool $assoc Deprecated: `false` is deprecated, always use `true` for array return. | ||
* @param int|null $depth | ||
* @param int|null $options | ||
* | ||
* @return object|array<mixed>|null | ||
*/ | ||
public function decodeJson(string $jsonValue, bool $assoc = false, ?int $depth = null, ?int $options = null); | ||
} |
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
Oops, something went wrong.