| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Contracts; |
| 4: | |
| 5: | use LaravelUi5\Core\Ui5\Contracts\ConfigurableInterface; |
| 6: | |
| 7: | /** |
| 8: | * Resolves effective settings for a Configurable target into an immutable Ui5Config. |
| 9: | * |
| 10: | * Notes: |
| 11: | * - Core implementation returns defaults only. |
| 12: | * - This method MUST be side-effect-free and MUST NOT mutate $target. |
| 13: | */ |
| 14: | interface SettingResolverInterface |
| 15: | { |
| 16: | /** |
| 17: | * Build an immutable configuration bag for the given target and context. |
| 18: | * |
| 19: | * @param ConfigurableInterface $target The class decorated with #[Setting(...)] attributes |
| 20: | * @param Ui5Context|null $ctx Runtime context (artifact, tenant, partner, locale). Can be null in tests. |
| 21: | * @return Ui5Config Typed, read-only configuration values keyed by setting key |
| 22: | */ |
| 23: | public function resolve(ConfigurableInterface $target, ?Ui5Context $ctx = null): Ui5Config; |
| 24: | } |
| 25: |