Class WPDA_Export_Formatted

This class should not be instantiated directly. Use it to built exports for specific types. Overwrite methods header, row and footer for your own type specific export.

author Peter Schulz
since 2.0.13
package WPDataAccess\Utilities

 Methods

WPDA_Export_Formatted constructor.

__construct() 
since 2.0.13

Main method to get arguments and start export.

export() 
since 2.0.13

Perform query and get rows

get_rows() 

Result is stored in $this->rows.

since 2.0.13

Implement file header here

header() 

Check if data type is numeric

is_numeric(string $data_type) : boolean

Parameters

$data_type

string

Column data type

Returns

booleanTRUE = numeric

Implement how to process a row here

row($row) 

Parameters

$row

Send export file to browser

send_export_file() 
since 2.0.13

 Properties

 

Select columns

$columns : array | null

Default

null
 

Column data types

$data_types : array

Default

array()
 

Number of rows found

$row_count : integer

Default

0
 

Array containing selected rows

$rows : null

Default

null
 

Database schema name

$schema_name : string

Default

''
 

Query

$statement : string

Default

''

Select statement used to perform export.

 

Database table name

$table_names : string

Default

''
 

Primary key columns

$table_primary_key : array

Default

array()
 

Where clause added to query

$where : string

Default

''
 

Handle to table columns

$wpda_list_columns : object | null

Default

null