1 | <?php |
||
20 | trait ActiveRecord |
||
21 | { |
||
22 | /** |
||
23 | * @return string |
||
24 | */ |
||
25 | public abstract static function recordClass(): string; |
||
26 | |||
27 | /** |
||
28 | * @return Connection |
||
29 | */ |
||
30 | protected static function getDb(): Connection |
||
37 | |||
38 | /******************************************* |
||
39 | * CREATE |
||
40 | *******************************************/ |
||
41 | |||
42 | /** |
||
43 | * @param array $attributes |
||
44 | * @return Record |
||
45 | */ |
||
46 | public function create(array $attributes = []): Record |
||
61 | |||
62 | /******************************************* |
||
63 | * QUERY |
||
64 | *******************************************/ |
||
65 | |||
66 | /** |
||
67 | * @param array $config |
||
68 | * @return \yii\db\ActiveQuery |
||
69 | */ |
||
70 | public function getQuery($config = []): ActiveQuery |
||
84 | |||
85 | /** |
||
86 | * @param array $config |
||
87 | * @return array |
||
88 | */ |
||
89 | protected function prepareQueryConfig($config = []) |
||
93 | } |
||
94 |