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

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

- Page: https://pluginprobe.com/plugins/desktop-mode/1.1.10/code/includes/framework/app/standalone/class-store.php
- Raw: https://pluginprobe.com/plugins/desktop-mode/1.1.10/raw/includes/framework/app/standalone/class-store.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-store.php#L10-L20`.

```php
<?php
/**
 * OpenStation App Framework — standalone Store adapter.
 *
 * In-memory. A bare PHP host that needs durability passes its own
 * implementation to `Os::standalone( array( 'store' => … ) )`.
 *
 * @package OpenStation
 */

namespace OpenStation\App\Standalone;

use OpenStation\App\Contracts\Store as StoreContract;

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

/**
 * In-memory key/value store.
 */
final class Store implements StoreContract {

	/**
	 * @var array<string,array<string,mixed>>
	 */
	private $data = array(
		'user' => array(),
		'site' => array(),
	);

	/** {@inheritDoc} */
	public function get( $scope, $key, $fallback = null ) {
		return isset( $this->data[ $scope ] ) && array_key_exists( $key, $this->data[ $scope ] )
			? $this->data[ $scope ][ $key ]
			: $fallback;
	}

	/** {@inheritDoc} */
	public function set( $scope, $key, $value ) {
		$this->data[ $scope ][ $key ] = $value;
	}

	/** {@inheritDoc} */
	public function delete( $scope, $key ) {
		unset( $this->data[ $scope ][ $key ] );
	}
}

```
