PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / dasprid / enum / src / NullValue.php
ameliabooking / vendor / dasprid / enum / src Last commit date
Exception 8 months ago AbstractEnum.php 8 months ago EnumMap.php 8 months ago NullValue.php 8 months ago
NullValue.php
76 lines
1 <?php
2 declare(strict_types = 1);
3
4 namespace DASPRiD\Enum;
5
6 use DASPRiD\Enum\Exception\CloneNotSupportedException;
7 use DASPRiD\Enum\Exception\SerializeNotSupportedException;
8 use DASPRiD\Enum\Exception\UnserializeNotSupportedException;
9
10 final class NullValue
11 {
12 /**
13 * @var self
14 */
15 private static $instance;
16
17 private function __construct()
18 {
19 }
20
21 public static function instance() : self
22 {
23 return self::$instance ?: self::$instance = new self();
24 }
25
26 /**
27 * Forbid cloning enums.
28 *
29 * @throws CloneNotSupportedException
30 */
31 final public function __clone()
32 {
33 throw new CloneNotSupportedException();
34 }
35
36 /**
37 * Forbid serializing enums.
38 *
39 * @throws SerializeNotSupportedException
40 */
41 final public function __sleep() : array
42 {
43 throw new SerializeNotSupportedException();
44 }
45
46 /**
47 * Forbid serializing enums.
48 *
49 * @throws SerializeNotSupportedException
50 */
51 final public function __serialize() : array
52 {
53 throw new SerializeNotSupportedException();
54 }
55
56 /**
57 * Forbid unserializing enums.
58 *
59 * @throws UnserializeNotSupportedException
60 */
61 final public function __wakeup() : void
62 {
63 throw new UnserializeNotSupportedException();
64 }
65
66 /**
67 * Forbid unserializing enums.
68 *
69 * @throws UnserializeNotSupportedException
70 */
71 final public function __unserialize($arg) : void
72 {
73 throw new UnserializeNotSupportedException();
74 }
75 }
76