1 | <?php |
||
6 | class DBStaticRecord { |
||
7 | |||
8 | public static $_table = '_table'; |
||
9 | public static $_idField = 'id'; |
||
10 | |||
11 | /** |
||
12 | * @var db_mysql $dbStatic |
||
13 | */ |
||
14 | protected static $dbStatic; |
||
15 | |||
16 | /** |
||
17 | * DBStaticRecord constructor. |
||
18 | * |
||
19 | * @param db_mysql|null $db |
||
20 | */ |
||
21 | public static function _init($db = null) { |
||
24 | |||
25 | /** |
||
26 | * @return DbSqlStatement |
||
27 | */ |
||
28 | public static function buildSelect() { |
||
31 | |||
32 | /** |
||
33 | * @return DbSqlStatement |
||
34 | */ |
||
35 | public static function buildSelectLock() { |
||
41 | |||
42 | /** |
||
43 | * @param array $where |
||
44 | * @param mixed|array $fieldList |
||
45 | * Field list can be scalar - it would be converted to array and used as field name |
||
46 | * @param bool $for_update |
||
47 | * |
||
48 | * @return array|null |
||
49 | * |
||
50 | * @see static::getRecordList |
||
51 | */ |
||
52 | protected static function getRecord($where = array(), $fieldList = '*', $for_update = false) { |
||
61 | |||
62 | /** |
||
63 | * Get maximum ID from table |
||
64 | * |
||
65 | * @return int |
||
66 | */ |
||
67 | public static function getMaxId() { |
||
72 | |||
73 | /** |
||
74 | * @param int|string $recordId |
||
75 | * @param mixed|array $fieldList |
||
76 | * @param bool $forUpdate |
||
77 | * |
||
78 | * @return array|null |
||
79 | */ |
||
80 | public static function getRecordById($recordId, $fieldList = '*', $forUpdate = false) { |
||
83 | |||
84 | /** |
||
85 | * @param DbSqlStatement $statement |
||
86 | * |
||
87 | * @return array|bool|mysqli_result|null |
||
88 | */ |
||
89 | protected static function execute($statement) { |
||
92 | |||
93 | /** |
||
94 | * @param DbSqlStatement $statement |
||
95 | * |
||
96 | * @return array|null |
||
97 | */ |
||
98 | protected static function fetchOne($statement) { |
||
101 | |||
102 | /** |
||
103 | * @param array $idList |
||
104 | * |
||
105 | * @return mysqli_result|null |
||
106 | */ |
||
107 | /** |
||
108 | * @param array $idList |
||
109 | * |
||
110 | * @return mysqli_result|null |
||
111 | */ |
||
112 | public static function queryExistsIdInList($idList) { |
||
124 | |||
125 | |||
126 | /** |
||
127 | * @param string $idList |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public static function filterIdListStringRepack($idList) { |
||
146 | |||
147 | /** |
||
148 | * |
||
149 | */ |
||
150 | public static function lockAllRecords() { |
||
155 | |||
156 | } |
||
157 | |||
159 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.