1 | <?php |
||
27 | abstract class IntegrationConnection extends ActiveRecordWithId implements ConnectionInterface |
||
28 | { |
||
29 | use HandleRulesTrait; |
||
30 | |||
31 | /** |
||
32 | * The query class this record uses |
||
33 | */ |
||
34 | const QUERY_CLASS = IntegrationConnectionQuery::class; |
||
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | public function init() |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | public static function instantiate($row) |
||
55 | |||
56 | /** |
||
57 | * @param static $record |
||
58 | * @param $row |
||
59 | */ |
||
60 | public static function populateRecord($record, $row) |
||
65 | |||
66 | /******************************************* |
||
67 | * QUERY |
||
68 | *******************************************/ |
||
69 | /** |
||
70 | * @noinspection PhpDocMissingThrowsInspection |
||
71 | * @return IntegrationConnectionQuery |
||
72 | */ |
||
73 | public static function find(): IntegrationConnectionQuery |
||
84 | |||
85 | /** |
||
86 | * @inheritdoc |
||
87 | */ |
||
88 | protected static function findByCondition($condition) |
||
97 | |||
98 | |||
99 | /******************************************* |
||
100 | * RULES |
||
101 | *******************************************/ |
||
102 | |||
103 | /** |
||
104 | * @inheritdoc |
||
105 | */ |
||
106 | public function rules() |
||
137 | |||
138 | |||
139 | /******************************************* |
||
140 | * EVENTS |
||
141 | *******************************************/ |
||
142 | |||
143 | /** |
||
144 | * @param bool $insert |
||
145 | * @param array $changedAttributes |
||
146 | */ |
||
147 | public function afterSave($insert, $changedAttributes) |
||
152 | |||
153 | |||
154 | /******************************************* |
||
155 | * SETTINGS |
||
156 | *******************************************/ |
||
157 | |||
158 | /** |
||
159 | * @param string $attribute |
||
160 | * @return mixed |
||
161 | */ |
||
162 | public function getSettingsValue(string $attribute) |
||
167 | |||
168 | /** |
||
169 | * @param string $attribute |
||
170 | * @param $value |
||
171 | * @return $this |
||
172 | */ |
||
173 | public function setSettingsValue(string $attribute, $value) |
||
181 | |||
182 | /** |
||
183 | * @return array|null |
||
184 | */ |
||
185 | protected function ensureSettings() |
||
197 | } |
||
198 |