1 | <?php declare(strict_types = 1); |
||
16 | class dbQuery extends QueryHandler |
||
|
|||
17 | { |
||
18 | /** Virtual field for base table */ |
||
19 | public $own_virtual_fields = array(); |
||
20 | /** Virtual fields */ |
||
21 | public $virtual_fields = array(); |
||
22 | public $empty = false; |
||
23 | protected $class_name; |
||
24 | /** |
||
25 | * @var QueryInterface |
||
26 | * @\samsonframework\containerannotation\Injectable |
||
27 | */ |
||
28 | protected $query; |
||
29 | /** @var bool True to show requests */ |
||
30 | protected $debug = false; |
||
31 | |||
32 | /** Constructor */ |
||
33 | public function __construct() |
||
38 | |||
39 | /** |
||
40 | * @param string $metadata |
||
41 | * |
||
42 | * @deprecated Use entity() |
||
43 | * @return QueryInterface|string |
||
44 | */ |
||
45 | public function className(string $metadata = null) |
||
53 | |||
54 | |||
55 | /** @deprecated Use QueryInterface implementation */ |
||
56 | public function own_limit($st, $en = 0) |
||
62 | |||
63 | /** @deprecated Use QueryInterface implementation */ |
||
64 | public function own_group_by($params) |
||
70 | |||
71 | /** @deprecated Use QueryInterface implementation */ |
||
72 | public function own_order_by($field, $direction = 'ASC') |
||
78 | |||
79 | /** @deprecated Use QueryInterface implementation */ |
||
80 | public function flush() |
||
84 | |||
85 | /** @see idbQuery::random() */ |
||
86 | public function random(& $return_value = null) |
||
94 | |||
95 | /** |
||
96 | * @param $columnName |
||
97 | * @param string $sorting |
||
98 | * |
||
99 | * @deprecated Use groupBy() |
||
100 | * @return QueryInterface|static |
||
101 | */ |
||
102 | public function order_by($columnName, $sorting = 'ASC') |
||
106 | |||
107 | /** |
||
108 | * Execute current query and receive collection of RecordInterface objects from database. |
||
109 | * @deprecated Use self::find() |
||
110 | * @return RecordInterface[] Database entities collection |
||
111 | */ |
||
112 | public function exec() : array |
||
116 | |||
117 | /** @deprecated Use QueryInterface implementation */ |
||
118 | public function or_($relation = 'OR') |
||
132 | |||
133 | /** @deprecated Use QueryInterface implementation */ |
||
134 | public function debug($value = true) |
||
140 | |||
141 | /** @deprecated Use QueryInterface implementation */ |
||
142 | public function fieldsNew($fieldName, & $return = null) |
||
146 | |||
147 | /** @deprecated Use QueryInterface implementation */ |
||
148 | public function group_by($field) |
||
155 | |||
156 | /** @deprecated Use QueryInterface implementation */ |
||
157 | public function add_field($field, $alias = null, $own = true) |
||
176 | |||
177 | /** @deprecated Use QueryInterface implementation */ |
||
178 | public function innerCount($field = '*') |
||
182 | |||
183 | /** @deprecated Use QueryInterface implementation */ |
||
184 | public function id($value) |
||
190 | |||
191 | /** |
||
192 | * Add condition to current query. |
||
193 | * This method supports receives three possible types for $fieldName, |
||
194 | * this is deprecated logic and this should be changed to use separate methods |
||
195 | * for each argument type. |
||
196 | * |
||
197 | * @param string|ConditionInterface|ArgumentInterface $fieldName Entity field name |
||
198 | * @param string $fieldValue Value |
||
199 | * @param string $relation Relation between field name and its value |
||
200 | * |
||
201 | * @deprecated Use QueryInterface implementation |
||
202 | * @return self Chaining |
||
203 | */ |
||
204 | public function cond($fieldName, $fieldValue = null, $relation = '=') |
||
220 | } |
||
221 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider
.