1 | <?php |
||
26 | class ProviderQuery extends Query |
||
27 | { |
||
28 | use ProviderAttributesTrait, |
||
29 | AuditAttributesTrait, |
||
30 | PopulateObjectTrait; |
||
31 | |||
32 | /** |
||
33 | * @inheritdoc |
||
34 | */ |
||
35 | public $orderBy = [ |
||
36 | 'enabled' => SORT_DESC, |
||
37 | 'dateUpdated' => SORT_DESC |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | public function init() |
||
53 | |||
54 | |||
55 | /******************************************* |
||
56 | * RESULTS |
||
57 | *******************************************/ |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | * @return array|mixed|null |
||
62 | * @throws \yii\base\InvalidConfigException |
||
63 | */ |
||
64 | public function one($db = null) |
||
72 | |||
73 | /******************************************* |
||
74 | * CREATE OBJECT |
||
75 | *******************************************/ |
||
76 | |||
77 | /** |
||
78 | * @param array $config |
||
79 | * @return mixed |
||
80 | * @throws \yii\base\InvalidConfigException |
||
81 | */ |
||
82 | protected function createObject($config) |
||
94 | |||
95 | /** |
||
96 | * @param array $config |
||
97 | * @return array |
||
98 | */ |
||
99 | protected function prepareConfig(array $config = []): array |
||
117 | |||
118 | /** |
||
119 | * @param array $config |
||
120 | * @return array |
||
121 | */ |
||
122 | protected function extractSettings(array &$config): array |
||
137 | |||
138 | /******************************************* |
||
139 | * PREPARE |
||
140 | *******************************************/ |
||
141 | |||
142 | /** |
||
143 | * @inheritdoc |
||
144 | * |
||
145 | * @throws QueryAbortedException if it can be determined that there won’t be any results |
||
146 | */ |
||
147 | public function prepare($builder) |
||
154 | } |
||
155 |