1 | <?php |
||
25 | class RecordField extends Model |
||
26 | { |
||
27 | protected $propNameMap = [ |
||
28 | 'change_type' => 'changeType', |
||
29 | 'field_id' => 'fieldId', |
||
30 | 'list_item' => 'listItem', |
||
31 | 'list_item_dest' => 'listItemDest' |
||
32 | ]; |
||
33 | |||
34 | protected $mappingClasses = [ |
||
35 | 'value' => 'Yandex\DataSync\Models\Database\Delta\RecordFieldValue' |
||
36 | ]; |
||
37 | |||
38 | /** |
||
39 | * Adding a new field or change existing values. |
||
40 | */ |
||
41 | const CHANGE_TYPE_SET = 'set'; |
||
42 | /** |
||
43 | * Deleting field. |
||
44 | */ |
||
45 | const CHANGE_TYPE_DELETE = 'delete'; |
||
46 | |||
47 | //this change is only available for the field, which has a data type list ( DATA_TYPE_LIST ). |
||
48 | /** |
||
49 | * Add a new item to the list. |
||
50 | */ |
||
51 | const CHANGE_TYPE_LIST_ITEM_INSERT = 'list_item_insert'; |
||
52 | /** |
||
53 | * Set the value for the element at the specified index. |
||
54 | */ |
||
55 | const CHANGE_TYPE_LIST_ITEM_SET = 'list_item_set'; |
||
56 | /** |
||
57 | * Move element of the array. |
||
58 | */ |
||
59 | const CHANGE_TYPE_LIST_ITEM_MOVE = 'list_item_move'; |
||
60 | /** |
||
61 | * Delete a list item. |
||
62 | */ |
||
63 | const CHANGE_TYPE_LIST_ITEM_DELETE = 'list_item_delete'; |
||
64 | |||
65 | /** |
||
66 | * @var string |
||
67 | */ |
||
68 | protected $changeType; |
||
69 | |||
70 | /** |
||
71 | * @var string |
||
72 | */ |
||
73 | protected $fieldId; |
||
74 | |||
75 | /** |
||
76 | * The index of the list, to which is applied the change. |
||
77 | * This field is specified with any change, starting with "list_item". |
||
78 | * |
||
79 | * @var int |
||
80 | */ |
||
81 | protected $listItem; |
||
82 | |||
83 | /** |
||
84 | * The new list item index. It specifies the type of change at the list item move. |
||
85 | * |
||
86 | * @var int |
||
87 | */ |
||
88 | protected $listItemDest; |
||
89 | |||
90 | /** |
||
91 | * @var RecordFieldValue |
||
92 | */ |
||
93 | protected $value; |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | 1 | public function getChangeType() |
|
102 | |||
103 | /** |
||
104 | * @param string $changeType |
||
105 | * |
||
106 | * @return $this |
||
107 | */ |
||
108 | 5 | public function setChangeType($changeType) |
|
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | 2 | public function getFieldId() |
|
121 | |||
122 | /** |
||
123 | * @param string $fieldId |
||
124 | * |
||
125 | * @return $this |
||
126 | */ |
||
127 | 5 | public function setFieldId($fieldId) |
|
132 | |||
133 | /** |
||
134 | * @return int |
||
135 | */ |
||
136 | 1 | public function getListItem() |
|
140 | |||
141 | /** |
||
142 | * @param int $listItem |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | 1 | public function setListItem($listItem) |
|
151 | |||
152 | /** |
||
153 | * @return int |
||
154 | */ |
||
155 | 1 | public function getListItemDest() |
|
159 | |||
160 | /** |
||
161 | * @param int $listItemDest |
||
162 | * |
||
163 | * @return $this |
||
164 | */ |
||
165 | 1 | public function setListItemDest($listItemDest) |
|
170 | |||
171 | /** |
||
172 | * @return RecordFieldValue |
||
173 | */ |
||
174 | 2 | public function getValue() |
|
178 | |||
179 | /** |
||
180 | * @param RecordFieldValue $value |
||
181 | * |
||
182 | * @return $this |
||
183 | */ |
||
184 | 4 | public function setValue(RecordFieldValue $value) |
|
189 | |||
190 | /** |
||
191 | * Get array from object |
||
192 | * |
||
193 | * @param array|object $data |
||
194 | * |
||
195 | * @return array |
||
196 | */ |
||
197 | 4 | protected function toArrayRecursive($data) |
|
206 | } |
||
207 |
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.