PHP Class Inpsyde\MultilingualPress\Database\WPDBTableInstaller

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Database\TableInstaller
Datei anzeigen Open project: inpsyde/multilingual-press Class Usage Examples

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\Database\Table $table = null ) Constructor. Sets up the properties.
install ( Inpsyde\MultilingualPress\Database\Table $table = null ) : boolean Installs the given table.
uninstall ( Inpsyde\MultilingualPress\Database\Table $table = null ) : boolean Uninstalls the given table.

Private Methods

Method Description
get_columns ( array $schema ) : string Returns the according SQL string for the columns in the given table schema.
get_keys ( Inpsyde\MultilingualPress\Database\Table $table ) : string Returns the according SQL string for the keys of the given table.
get_options ( ) : string Returns the SQL string for the table options.
insert_default_content ( Inpsyde\MultilingualPress\Database\Table $table ) : void Inserts the according default content into the given table.
table_exists ( string $table_name ) : boolean Checks if a table with the given name exists in the database.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Database\Table $table = null )
$table Inpsyde\MultilingualPress\Database\Table Optional. Table object. Defaults to null.

install() public method

Installs the given table.
Since: 3.0.0
public install ( Inpsyde\MultilingualPress\Database\Table $table = null ) : boolean
$table Inpsyde\MultilingualPress\Database\Table Optional. Table object. Defaults to null.
return boolean Whether or not the table was installed successfully.

uninstall() public method

Uninstalls the given table.
Since: 3.0.0
public uninstall ( Inpsyde\MultilingualPress\Database\Table $table = null ) : boolean
$table Inpsyde\MultilingualPress\Database\Table Optional. Table object. Defaults to null.
return boolean Whether or not the table was uninstalled successfully.