| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Services\Theme\Readers; |
| 4 |
|
| 5 |
/** |
| 6 |
* Reads the border radii a theme's owner set in the theme's own settings. |
| 7 |
* |
| 8 |
* A separate contract from ThemeSettingsReader on purpose: adding a method to |
| 9 |
* that interface would break every third-party class implementing it. A |
| 10 |
* reader that can read a radius implements both. |
| 11 |
* |
| 12 |
* Like the colours, a reader states only what the theme states: a role the |
| 13 |
* theme has no setting for is omitted, never guessed, and FluentCart prints |
| 14 |
* nothing for it. |
| 15 |
*/ |
| 16 |
interface ThemeRadiusReader |
| 17 |
{ |
| 18 |
/** |
| 19 |
* Role => the length the theme states, as the theme prints it. |
| 20 |
* |
| 21 |
* Roles: card, btn, input (RadiusPalette::roles()). ThemePalette::radii() |
| 22 |
* normalises each value through RadiusPalette::sanitizeLength(), so a |
| 23 |
* value outside that grammar (a percentage, calc(), several corners) is |
| 24 |
* dropped there; return '' or omit the role rather than guess. |
| 25 |
* |
| 26 |
* @return array |
| 27 |
*/ |
| 28 |
public static function radii(): array; |
| 29 |
} |
| 30 |
|