1 | <?php |
||
23 | class EnumColumn extends Component implements RecordAccessorInterface, ColumnInterface |
||
24 | { |
||
25 | /** |
||
26 | * Set of allowed enum values. |
||
27 | */ |
||
28 | const VALUES = []; |
||
29 | |||
30 | /** |
||
31 | * Default value. |
||
32 | */ |
||
33 | const DEFAULT = null; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $changed = false; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $value; |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function __construct(string $value) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function setValue($data) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function packValue(): string |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function hasChanges(): bool |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function flushChanges() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function compileUpdates(string $field = '') |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function __toString() |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function jsonSerialize() |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public static function describeColumn(AbstractColumn $column) |
||
129 | } |