File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515use function sprintf ;
1616
1717final class PolicySpec implements IPolicyDefinition {
18+ public const RESOLUTION_MODE_RESOLVED = 'resolved ' ;
19+ public const RESOLUTION_MODE_VALUE_CHOICE = 'value_choice ' ;
20+
1821 /** @var list<mixed>|Closure(PolicyContext): list<mixed> */
1922 private array |Closure $ allowedValuesResolver ;
2023 /** @var Closure(mixed): mixed|null */
@@ -35,6 +38,7 @@ public function __construct(
3538 ?Closure $ validator = null ,
3639 private ?string $ appConfigKey = null ,
3740 private ?string $ userPreferenceKey = null ,
41+ private string $ resolutionMode = self ::RESOLUTION_MODE_RESOLVED ,
3842 ) {
3943 $ this ->allowedValuesResolver = $ allowedValues ;
4044 $ this ->normalizer = $ normalizer ;
@@ -46,6 +50,11 @@ public function key(): string {
4650 return $ this ->key ;
4751 }
4852
53+ #[\Override]
54+ public function resolutionMode (): string {
55+ return $ this ->resolutionMode ;
56+ }
57+
4958 #[\Override]
5059 public function getAppConfigKey (): string {
5160 return $ this ->appConfigKey ?? $ this ->key ;
You can’t perform that action at this time.
0 commit comments