Confetti Bits

cb-transactions-exports.php

Table of Contents

Functions

cb_transactions_get_history_for_user()  : mixed
CB Transactions Get History for User
cb_csv_send_headers()  : mixed
CB CSV Send Headers
cb_generate_csv()  : mixed
CB Generate CSV
cb_export()  : mixed
CB Export

Functions

cb_transactions_get_history_for_user()

CB Transactions Get History for User

cb_transactions_get_history_for_user([mixed $user_id = 0 ][, mixed $export_type = '' ]) : mixed

Handles the logic behind getting the right data from the database.

Parameters
$user_id : mixed = 0
$export_type : mixed = ''
Tags
todo:

Fix this tomfoolery. And type check your variables for the love of god

since
1.0.0

cb_csv_send_headers()

CB CSV Send Headers

cb_csv_send_headers([mixed $file_name = '' ]) : mixed

Manually alters headers to allow for us to modify how a csv reaches an end user, and to ensure safe passage for our noble data wizards.

Parameters
$file_name : mixed = ''
Tags
since
1.0.0

cb_generate_csv()

CB Generate CSV

cb_generate_csv([array<string|int, mixed> $user_transactions = array() ][, string $export_type = '' ]) : mixed

Responsible for generating csv files for users that request an export of their data.

Parameters
$user_transactions : array<string|int, mixed> = array()

A 2D array of transactions

$export_type : string = ''

The type of export the user requested.

Tags
since
1.0.0

cb_export()

CB Export

cb_export() : mixed

Checks to see if export parameters are set on a POST request, exports transactions from the database based on parameters.

Tags
since
1.0.0

        
On this page

Search results