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 int $max_txn_id |
||
74 | * |
||
75 | * @return array |
||
1 ignored issue
–
show
|
|||
76 | * @access public |
||
77 | */ |
||
78 | public function get_sql_donorlist_ary($max_txn_id = 0) |
||
105 | |||
106 | /** |
||
107 | * SQL Query to return donors list details |
||
108 | * |
||
109 | * @return string |
||
110 | * @access public |
||
111 | */ |
||
112 | public function build_sql_donorlist_data($sql_donorlist_ary) |
||
117 | |||
118 | /** |
||
119 | * Returns total entries of selected field |
||
120 | * |
||
121 | * @param array $count_sql_ary |
||
122 | * @param string $selected_field |
||
123 | * |
||
124 | * @return int |
||
125 | * @access public |
||
126 | */ |
||
127 | public function query_sql_count($count_sql_ary, $selected_field) |
||
142 | |||
143 | /** |
||
144 | * Returns the SQL Query for displaying simple transactions details |
||
145 | * |
||
146 | * @param $keywords |
||
147 | * @param $sort_by |
||
148 | * @param $log_time |
||
149 | * |
||
150 | * @return array |
||
151 | * @access public |
||
152 | */ |
||
153 | public function get_logs_sql_ary($keywords, $sort_by, $log_time) |
||
180 | |||
181 | /** |
||
182 | * Generates a sql condition for the specified keywords |
||
183 | * |
||
184 | * @param string $keywords The keywords the user specified to search for |
||
185 | * @param string $statement_operator The operator used to prefix the statement ('AND' by default) |
||
186 | * |
||
187 | * @return string Returns the SQL condition searching for the keywords |
||
188 | * @access private |
||
189 | */ |
||
190 | private function generate_sql_keyword($keywords, $statement_operator = 'AND') |
||
217 | |||
218 | /** |
||
219 | * Returns user information based on the ID of the donor or they email |
||
220 | * |
||
221 | * @param string $type |
||
222 | * @param int $arg |
||
223 | * |
||
224 | * @return array|bool |
||
225 | * @access public |
||
226 | */ |
||
227 | public function query_donor_user_data($type = 'user', $arg = 1) |
||
249 | |||
250 | /** |
||
251 | * Returns simple details of all PayPal transactions logged in the database |
||
252 | * |
||
253 | * @param array $get_logs_sql_ary |
||
254 | * @param array $url_ary |
||
255 | * @param int $limit |
||
256 | * @param int $last_page_offset |
||
257 | * |
||
258 | * @return array $log |
||
259 | * @access public |
||
260 | */ |
||
261 | public function build_log_ary($get_logs_sql_ary, $url_ary, $limit = 0, $last_page_offset = 0) |
||
286 | |||
287 | /** |
||
288 | * Build transaction url for placing into templates. |
||
289 | * |
||
290 | * @param int $id The users transaction id |
||
291 | * @param string $txn_id The txn number id |
||
292 | * @param string $custom_url optional parameter to specify a profile url. The transaction id get appended to this |
||
293 | * url as &id={id} |
||
294 | * @param bool $colour |
||
295 | * |
||
296 | * @return string A string consisting of what is wanted. |
||
297 | * @access private |
||
298 | */ |
||
299 | private function build_transaction_url($id, $txn_id, $custom_url = '', $colour = false) |
||
327 | |||
328 | /** |
||
329 | * Returns SQL WHERE clause for all marked items |
||
330 | * |
||
331 | * @param $marked |
||
332 | * |
||
333 | * @return string |
||
334 | * @access public |
||
335 | */ |
||
336 | public function build_marked_where_sql($marked) |
||
346 | } |
||
347 |
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.