Table_Factory
A factory for creating Posts_Table objects.
Tags
Table of Contents
- $current_id : mixed
- $tables : mixed
- create() : Posts_Table
- Create a new table based on the supplied args.
- fetch() : Posts_Table|false
- Fetch an existing table by ID.
- generate_id() : mixed
Properties
$current_id
private
static mixed
$current_id
= 1
Tags
$tables
private
static mixed
$tables
= []
Tags
Methods
create()
Create a new table based on the supplied args.
public
static create([array<string|int, mixed> $args = [] ]) : Posts_Table
Parameters
- $args : array<string|int, mixed> = []
-
The args to use for the table.
Tags
Return values
Posts_Table —The posts table object.
fetch()
Fetch an existing table by ID.
public
static fetch(string $id) : Posts_Table|false
Parameters
- $id : string
-
The posts table ID.
Tags
Return values
Posts_Table|false —The posts table object.
generate_id()
private
static generate_id(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>