# desktop-mode/1.1.10/includes/framework/app/standalone/class-settings.php

OpenStation: Desktop Windows, Dock &amp; Virtual Desktops for WP Admin, version 1.1.10. 53 lines.

- Page: https://pluginprobe.com/plugins/desktop-mode/1.1.10/code/includes/framework/app/standalone/class-settings.php
- Raw: https://pluginprobe.com/plugins/desktop-mode/1.1.10/raw/includes/framework/app/standalone/class-settings.php
- Modified: 2026-09-04T15:30:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/desktop-mode/1.1.10/code/includes/framework/app/standalone/class-settings.php#L10-L20`.

```php
<?php
/**
 * OpenStation App Framework — standalone Settings adapter.
 *
 * Two plain arrays. The host seeds them; apps read them.
 *
 * @package OpenStation
 */

namespace OpenStation\App\Standalone;

use OpenStation\App\Contracts\Settings as SettingsContract;

// Direct access, unless a standalone host is booting on bare PHP.
if ( ! defined( 'ABSPATH' ) ) {
	defined( 'OPENSTATION_STANDALONE' ) || exit;
}

/**
 * Array-backed settings.
 */
final class Settings implements SettingsContract {

	/**
	 * @var array<string,mixed>
	 */
	private $preferences;

	/**
	 * @var array<string,mixed>
	 */
	private $options;

	/**
	 * @param array<string,mixed> $preferences Per-user preferences.
	 * @param array<string,mixed> $options     Site options.
	 */
	public function __construct( array $preferences = array(), array $options = array() ) {
		$this->preferences = $preferences;
		$this->options     = $options;
	}

	/** {@inheritDoc} */
	public function user_preference( $key, $fallback = null ) {
		return array_key_exists( $key, $this->preferences ) ? $this->preferences[ $key ] : $fallback;
	}

	/** {@inheritDoc} */
	public function site_option( $key, $fallback = null ) {
		return array_key_exists( $key, $this->options ) ? $this->options[ $key ] : $fallback;
	}
}

```
