PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / app / Services / Theme / Readers / ThemeSettingsReader.php

ThemeSettingsReader.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.6, at app/Services/Theme/Readers/ThemeSettingsReader.php

41 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Services\Theme\Readers;
4
5 /**
6 * Reads the colours a theme's owner set in the theme's own settings.
7 *
8 * Palette slots only say which colours a theme offers; settings say which of
9 * them the owner put where. A reader reports the second, so inheritance
10 * follows the owner's Accent, Body Text, Content Background and Button choices
11 * instead of guessing them from slot positions.
12 *
13 * One reader per vendor. Each states only what the theme actually states: a
14 * role the reader cannot read is omitted, never guessed, and ThemePalette
15 * derives it exactly as it would without a reader.
16 */
17 interface ThemeSettingsReader
18 {
19 /**
20 * Whether this reader applies to the running site.
21 *
22 * Detect by capability (the vendor's API), not by theme name, so child
23 * themes and renamed theme folders keep working.
24 *
25 * @return bool
26 */
27 public static function applies(): bool;
28
29 /**
30 * Role => value for the roles the theme states.
31 *
32 * Roles: surface, text, accent, border, button_bg, button_text,
33 * button_hover_bg, button_hover_text. A value is a hex, or a live
34 * reference with its measurable fallback (`var(--x, #hex)`) — normalise
35 * each through ThemePalette::settingValue().
36 *
37 * @return array
38 */
39 public static function roles(): array;
40 }
41