1 | <?php |
||
26 | abstract class IntegrationConnection extends ActiveRecordWithId |
||
27 | { |
||
28 | use HandleRulesTrait; |
||
29 | |||
30 | /** |
||
31 | * The query class this record uses |
||
32 | */ |
||
33 | const QUERY_CLASS = IntegrationConnectionQuery::class; |
||
34 | |||
35 | /** |
||
36 | * @param static $record |
||
37 | * @param $row |
||
38 | */ |
||
39 | public static function populateRecord($record, $row) |
||
44 | |||
45 | |||
46 | /******************************************* |
||
47 | * QUERY |
||
48 | *******************************************/ |
||
49 | |||
50 | /** |
||
51 | * @noinspection PhpDocMissingThrowsInspection |
||
52 | * @return IntegrationConnectionQuery |
||
53 | */ |
||
54 | public static function find(): IntegrationConnectionQuery |
||
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | protected static function findByCondition($condition) |
||
78 | |||
79 | |||
80 | /******************************************* |
||
81 | * RULES |
||
82 | *******************************************/ |
||
83 | |||
84 | /** |
||
85 | * @inheritdoc |
||
86 | */ |
||
87 | public function rules() |
||
121 | |||
122 | |||
123 | /******************************************* |
||
124 | * EVENTS |
||
125 | *******************************************/ |
||
126 | |||
127 | /** |
||
128 | * @param bool $insert |
||
129 | * @param array $changedAttributes |
||
130 | */ |
||
131 | public function afterSave($insert, $changedAttributes) |
||
136 | |||
137 | |||
138 | /******************************************* |
||
139 | * SETTINGS |
||
140 | *******************************************/ |
||
141 | |||
142 | /** |
||
143 | * @param string $attribute |
||
144 | * @return mixed |
||
145 | */ |
||
146 | public function getSettingsValue(string $attribute) |
||
151 | |||
152 | /** |
||
153 | * @param string $attribute |
||
154 | * @param $value |
||
155 | * @return $this |
||
156 | */ |
||
157 | public function setSettingsValue(string $attribute, $value) |
||
165 | |||
166 | /** |
||
167 | * @return array|null |
||
168 | */ |
||
169 | protected function ensureSettings() |
||
181 | } |
||
182 |