Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Core\Preference\Domain\Service;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Preference\Domain\Model\PreferenceScope;
12
13/**
14 * Contract for Hierarchical Multi-Layer Configuration Resolution.
15 *
16 * Evaluates preferences through user, device, entity, module, and system fallback levels.
17 *
18 * @package App\Core\Preference\Domain\Service
19 */
20interface ConfigurationCascadeResolverInterface
21{
22    /**
23     * Resolves a configuration value through the multi-layer hierarchy.
24     *
25     * @param PreferenceScope $scope           User and contextual scope.
26     * @param string          $key             Configuration key name.
27     * @param mixed           $fallbackDefault Default value if no level provides a configuration.
28     * @return mixed Resolved configuration value.
29     */
30    public function resolve(PreferenceScope $scope, string $key, mixed $fallbackDefault = null): mixed;
31}