1 | <?php |
||
21 | class DomainsQuery extends CacheableQuery |
||
|
|||
22 | { |
||
23 | use ArrayableTrait, PopulateObject, traits\Attributes, AuditAttributes, FixedOrderBy; |
||
24 | |||
25 | /** |
||
26 | * @var bool Whether results should be returned in the order specified by [[domain]]. |
||
27 | */ |
||
28 | public $fixedOrder = false; |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public $orderBy = 'sortOrder'; |
||
34 | |||
35 | /** |
||
36 | * @var Domains |
||
37 | */ |
||
38 | private $field; |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | public function __construct(Domains $domains, $config = []) |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function init() |
||
69 | |||
70 | /** |
||
71 | * @return Domains |
||
72 | */ |
||
73 | public function getField(): Domains |
||
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | protected function fixedOrderColumn(): string |
||
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | * return static |
||
89 | */ |
||
90 | public function fixedOrder(bool $value = true) |
||
96 | |||
97 | // Query preparation/execution |
||
98 | // ------------------------------------------------------------------------- |
||
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | * |
||
103 | * @throws QueryAbortedException if it can be determined that there won’t be any results |
||
104 | */ |
||
105 | public function prepare($builder) |
||
120 | |||
121 | /** |
||
122 | * @inheritdoc |
||
123 | */ |
||
124 | public function one($db = null) |
||
134 | |||
135 | /** |
||
136 | * @param $row |
||
137 | * |
||
138 | * @return Domain |
||
139 | */ |
||
140 | protected function createObject($row): Domain |
||
144 | } |
||
145 |