Class WPDP_Export_Project

author Peter Schulz
since 2.0.0
package WPDataProjects\Utilities

 Methods

Main method to start export

export() 

This method checks arguments and starts the export according to the arguments provided.

since 1.0.0

Write insert into statement

insert_rows(string $table_name, string $where = ''
since 2.0.0

Parameters

$table_name

string

Database table name.

$where

string

SQL where clause.

Save column data types

column_data_types(array $table_columns) : array

This method creates a named array for all column names of a table in form: 'column_name' => 'data_type'

Argument $table_columns can be retrieved from WPDA_List_Columns->set_table_columns(). It must be prepared however with the idea that the instance of WPDA_List_Columns can be reused for best performance.

In fact this is just an array conversion.

since 2.0.0

Parameters

$table_columns

array

Column_names and data_types of a table (table name not used here).

Returns

arrayNamed array 'column_name' => 'data_type' for all columns in the table.

Set MySQL environment

db_begin() 
since 2.0.0

Set back MySQL environment

db_end() 
since 2.0.0

Export project tables

export_tables() 
since 2.0.0

Set export header (filename)

header($project_id) 

Parameters

$project_id

Check if data type is numeric

is_numeric(string $data_type) : boolean
since 2.0.0

Parameters

$data_type

string

Data type (simple).

Returns

boolean

Processing on invalid arguments

wrong_arguments() 
since 2.0.0

 Properties

 

Project ID

$project_id : string

Default

null