Table implements Registerable
Base `Table` class used to handle the registration of custom database tables during plugin activation.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- NAME = ''
- Name of the database table without the wpdb prefix.
- $db : Database
- Database connection
- __construct() : mixed
- Initialize the database class.
- create() : void
- Creates the database table.
- get_prefix() : string
- Get the prefix of the database.
- get_table_name() : string
- Returns the name of this table + the wpdb prefix.
- register() : void
- Maybe create the database table if it doesn't exist.
Constants
NAME
Name of the database table without the wpdb prefix.
public
string
NAME
= ''
Properties
$db
Database connection
protected
Database
$db
Methods
__construct()
Initialize the database class.
public
__construct() : mixed
Return values
mixed —create()
Creates the database table.
public
abstract create() : void
Return values
void —get_prefix()
Get the prefix of the database.
public
get_prefix() : string
Return values
string —get_table_name()
Returns the name of this table + the wpdb prefix.
public
get_table_name() : string
Return values
string —register()
Maybe create the database table if it doesn't exist.
public
register() : void