-
-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add special inclusion strategy interface that would accept a value …
…also * Adapted the getExclusionStrategy (in the Context.php) to return DisjunctionExclusionStratgy interface so it could also accept calls to methods with other interfaces beside the ExclusionStrategyInterface * Null value could be eventually adapted also with this kind of Exclusion strategy
- Loading branch information
slava-v
authored and
Veaceslav Vasilache
committed
May 24, 2022
1 parent
ac31cd1
commit 02d8e87
Showing
10 changed files
with
102 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace JMS\Serializer\Exclusion; | ||
|
||
use JMS\Serializer\Context; | ||
use JMS\Serializer\Metadata\PropertyMetadata; | ||
|
||
/** | ||
* Interface for exclusion strategies including the values | ||
* | ||
* @author Veaceslav vasilache <slava.dev@gmail.com> | ||
*/ | ||
interface ValueExclusionStrategyInterface | ||
{ | ||
/** | ||
* Whether the property should be skipped, using the value also | ||
* | ||
* @param PropertyMetadata $property | ||
* @param Context $context | ||
* @param mixed $value | ||
* | ||
* @return bool | ||
*/ | ||
public function shouldSkipPropertyWithValue(PropertyMetadata $property, Context $context, $value): bool; | ||
} |
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
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