\ActionScheduler_Abstract_Schema

Class ActionScheduler_Abstract_Schema

Summary

Methods
Properties
Constants
init()
register_tables()
tables_exist()
No public properties found
No constants found
get_table_definition()
get_full_table_name()
$schema_version
$db_version
$tables
N/A
schema_update_required()
mark_schema_update_complete()
update_table()
No private properties found
N/A

Properties

$schema_version

$schema_version : int

Increment this value in derived class to trigger a schema update.

Type

normal

$db_version

$db_version : string

Schema version stored in database.

Type

normal

$tables

$tables : array

Names of tables that will be registered by this class.

Type

normal

Methods

init()

init() : mixed

Can optionally be used by concrete classes to carry out additional initialization work as needed.

Returns

mixed

register_tables()

register_tables(bool  $force_update = false) : void

Register tables with WordPress, and create them if needed.

Parameters

bool $force_update

Optional. Default false. Use true to always run the schema update.

tables_exist()

tables_exist() : bool

Confirms that all of the tables registered by this schema class have been created.

Returns

bool

get_table_definition()

get_table_definition(string  $table) : string

Get table definition.

Parameters

string $table

The name of the table.

Returns

string —

The CREATE TABLE statement, suitable for passing to dbDelta

get_full_table_name()

get_full_table_name(string  $table) : string

Get full table name.

Parameters

string $table

Table name.

Returns

string —

The full name of the table, including the table prefix for the current blog

schema_update_required()

schema_update_required() : bool

Determine if the database schema is out of date by comparing the integer found in $this->schema_version with the option set in the WordPress options table

Returns

bool

mark_schema_update_complete()

mark_schema_update_complete() : void

Update the option in WordPress to indicate that our schema is now up to date

update_table()

update_table(string  $table) : void

Update the schema for the given table

Parameters

string $table

The name of the table to update.