PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / trunk
Floating Button – Easily Create Sticky, Fixed & Floating Buttons vtrunk
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
floating-button / classes / Publisher / Singleton.php

Singleton.php in Floating Button – Easily Create Sticky, Fixed & Floating Buttons trunk, at classes/Publisher/Singleton.php

28 lines 476 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FloatingButton\Publisher;
4
5 defined( 'ABSPATH' ) || exit;
6
7 class Singleton {
8 private static $instance;
9 private array $value = [];
10
11 private function __construct() {}
12
13 public static function getInstance() {
14 if (null === static::$instance) {
15 static::$instance = new static();
16 }
17
18 return static::$instance;
19 }
20
21 public function setValue($key, $value) {
22 $this->value[$key] = $value;
23 }
24
25 public function getValue(): array {
26 return $this->value;
27 }
28 }