# solid-performance/1.1.0/src/Performance/Config/Contracts/Strategy.php

Solid Performance – Your No-Code Caching, Performance, &amp; Page Speed Solution, version 1.1.0. 58 lines.

- Page: https://pluginprobe.com/plugins/solid-performance/1.1.0/code/src/Performance/Config/Contracts/Strategy.php
- Raw: https://pluginprobe.com/plugins/solid-performance/1.1.0/raw/src/Performance/Config/Contracts/Strategy.php
- Modified: 2024-08-12T20:38:26+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/solid-performance/1.1.0/code/src/Performance/Config/Contracts/Strategy.php#L10-L20`.

```php
<?php
/**
 * An interface that determines the structure of a config strategy.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */

namespace SolidWP\Performance\Config\Contracts;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Defines how configuration values should be stored & retrieved.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */
interface Strategy {

	/**
	 * Gets a value from the configuration.
	 *
	 * @since 0.1.0
	 *
	 * @param string $key The key for the value to retrieve.
	 *
	 * @return mixed|null The value for the key or null if not defined.
	 */
	public function get( string $key );

	/**
	 * Sets a value in the configuration.
	 *
	 * @since 0.1.0
	 *
	 * @param array $changes The changes to save.
	 *
	 * @return bool True on success, false if config could not be saved.
	 */
	public function save( array $changes );

	/**
	 * Checks that the current strategy is responsible for the passed option.
	 *
	 * @since 0.1.0
	 *
	 * @param string $option_key The key for the option to check.
	 *
	 * @return bool
	 */
	public function is_responsible_for( string $option_key ): bool;
}

```
