PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.1.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.1.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Config / Contracts / Strategy.php

Strategy.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.1.0, at src/Performance/Config/Contracts/Strategy.php

58 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * An interface that determines the structure of a config strategy.
4 *
5 * @since 0.1.0
6 *
7 * @package SolidWP\Performance
8 */
9
10 namespace SolidWP\Performance\Config\Contracts;
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 /**
17 * Defines how configuration values should be stored & retrieved.
18 *
19 * @since 0.1.0
20 *
21 * @package SolidWP\Performance
22 */
23 interface Strategy {
24
25 /**
26 * Gets a value from the configuration.
27 *
28 * @since 0.1.0
29 *
30 * @param string $key The key for the value to retrieve.
31 *
32 * @return mixed|null The value for the key or null if not defined.
33 */
34 public function get( string $key );
35
36 /**
37 * Sets a value in the configuration.
38 *
39 * @since 0.1.0
40 *
41 * @param array $changes The changes to save.
42 *
43 * @return bool True on success, false if config could not be saved.
44 */
45 public function save( array $changes );
46
47 /**
48 * Checks that the current strategy is responsible for the passed option.
49 *
50 * @since 0.1.0
51 *
52 * @param string $option_key The key for the option to check.
53 *
54 * @return bool
55 */
56 public function is_responsible_for( string $option_key ): bool;
57 }
58