class-settings-command.php

Settings write command — bounded orchestration for wppo_settings writes.

Source includes/Settings/class-settings-command.php1 min readPart of Performance Optimisation

includes/Settings/class-settings-command.php

Settings write command — bounded orchestration for wppo_settings writes.

Namespace: PerformanceOptimise\\Inc · Lines: 61

Class Settings_Command

Narrow command seam for settings writes.

Source: includes/Settings/class-settings-command.php, line 27

final class Settings_Command

Tags: @since NEXT

publicstatic save()

public static function save(array $settings, ?array=null $prior_settings): bool

Save a settings array, optionally snapshotting changed prior settings.

ParameterTypeDefaultDescription
$settingsarray—Settings to persist.
$prior_settings?array=null—Prior settings to snapshot when changed.

Return: bool — Settings_Store write result.

Tags: @since NEXT

Source: includes/Settings/class-settings-command.php, line 41

publicstatic restore_snapshot()

public static function restore_snapshot(): ?array

Restore the prior settings snapshot through Settings_Store.

Return: array|null — Restored settings, or null when no valid restore occurred.

Tags: @since NEXT

Source: includes/Settings/class-settings-command.php, line 57