1 | <?php |
||
15 | class transactions |
||
16 | { |
||
17 | protected $container; |
||
18 | protected $db; |
||
19 | protected $ppde_transactions_log_table; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * |
||
24 | * @param ContainerInterface $container Service container interface |
||
25 | * @param \phpbb\db\driver\driver_interface $db Database connection |
||
26 | * @param string $ppde_transactions_log_table Table name |
||
27 | * |
||
28 | * @access public |
||
29 | */ |
||
30 | public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, $ppde_transactions_log_table) |
||
36 | |||
37 | /** |
||
38 | * SQL Query to return Transaction log data table |
||
39 | * |
||
40 | * @param $transaction_id |
||
41 | * |
||
42 | * @return string |
||
43 | * @access public |
||
44 | */ |
||
45 | public function build_sql_data($transaction_id = 0) |
||
69 | |||
70 | /** |
||
71 | * Returns the SQL Query for generation the donors list |
||
72 | * |
||
73 | * @param bool $anonymous |
||
74 | * |
||
75 | * @return array |
||
1 ignored issue
–
show
|
|||
76 | * @access public |
||
77 | */ |
||
78 | public function get_sql_donorlist_ary($anonymous = false) |
||
103 | |||
104 | /** |
||
105 | * SQL Query to return donors list details |
||
106 | * |
||
107 | * @return string |
||
108 | * @access public |
||
109 | */ |
||
110 | public function build_sql_donorlist_data($sql_donorlist_ary) |
||
115 | |||
116 | /** |
||
117 | * Returns total entries of selected field |
||
118 | * |
||
119 | * @param array $count_sql_ary |
||
120 | * @param string $selected_field |
||
121 | * |
||
122 | * @return int |
||
123 | * @access public |
||
124 | */ |
||
125 | public function query_sql_count($count_sql_ary, $selected_field) |
||
140 | |||
141 | /** |
||
142 | * Returns the SQL Query for displaying simple transactions details |
||
143 | * |
||
144 | * @param $keywords |
||
145 | * @param $sort_by |
||
146 | * @param $log_time |
||
147 | * |
||
148 | * @return array |
||
149 | * @access public |
||
150 | */ |
||
151 | public function get_logs_sql_ary($keywords, $sort_by, $log_time) |
||
178 | |||
179 | /** |
||
180 | * Generates a sql condition for the specified keywords |
||
181 | * |
||
182 | * @param string $keywords The keywords the user specified to search for |
||
183 | * @param string $statement_operator The operator used to prefix the statement ('AND' by default) |
||
184 | * |
||
185 | * @return string Returns the SQL condition searching for the keywords |
||
186 | * @access private |
||
187 | */ |
||
188 | private function generate_sql_keyword($keywords, $statement_operator = 'AND') |
||
215 | |||
216 | /** |
||
217 | * Returns user information based on the ID of the donor or they email |
||
218 | * |
||
219 | * @param string $type |
||
220 | * @param int $arg |
||
221 | * |
||
222 | * @return array|bool |
||
223 | * @access public |
||
224 | */ |
||
225 | public function query_donor_user_data($type = 'user', $arg = 1) |
||
247 | |||
248 | /** |
||
249 | * Returns simple details of all PayPal transactions logged in the database |
||
250 | * |
||
251 | * @param array $get_logs_sql_ary |
||
252 | * @param array $url_ary |
||
253 | * @param int $limit |
||
254 | * @param int $last_page_offset |
||
255 | * |
||
256 | * @return array $log |
||
257 | * @access public |
||
258 | */ |
||
259 | public function build_log_ary($get_logs_sql_ary, $url_ary, $limit = 0, $last_page_offset = 0) |
||
284 | |||
285 | /** |
||
286 | * Build transaction url for placing into templates. |
||
287 | * |
||
288 | * @param int $id The users transaction id |
||
289 | * @param string $txn_id The txn number id |
||
290 | * @param string $custom_url optional parameter to specify a profile url. The transaction id get appended to this |
||
291 | * url as &id={id} |
||
292 | * @param bool $colour |
||
293 | * |
||
294 | * @return string A string consisting of what is wanted. |
||
295 | * @access private |
||
296 | */ |
||
297 | private function build_transaction_url($id, $txn_id, $custom_url = '', $colour = false) |
||
325 | |||
326 | /** |
||
327 | * Returns SQL WHERE clause for all marked items |
||
328 | * |
||
329 | * @param $marked |
||
330 | * |
||
331 | * @return string |
||
332 | * @access public |
||
333 | */ |
||
334 | public function build_marked_where_sql($marked) |
||
344 | } |
||
345 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.