1 | <?php |
||
20 | class EnumColumn implements RecordAccessorInterface, ColumnInterface |
||
21 | { |
||
22 | /** |
||
23 | * Set of allowed enum values. |
||
24 | */ |
||
25 | const VALUES = []; |
||
26 | |||
27 | /** |
||
28 | * Default value. |
||
29 | */ |
||
30 | const DEFAULT = null; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $changed = false; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $value; |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function __construct(string $value) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function stateValue($data) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function packValue(): string |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function hasChanges(): bool |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function flushChanges() |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public function compileUpdates(string $field = '') |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function __toString() |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function jsonSerialize() |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public static function describeColumn(AbstractColumn $column) |
||
126 | } |