SLPĀ® phpDocs

MySLP_History_Table
in package

Class MySLP_History_Table

Table of Contents

Constants

TABLE_SLUG  : string = 'myslp_logger'

Properties

$blog_filter  : int|null
$current_page  : int|null
$date_filter  : string|null
$logs_per_page  : int
$search  : string|null
$table_name  : string

Methods

__construct()  : mixed
MySLP_History_Table constructor.
date_filter()  : string
display()  : string
Dislpay the table.
get_records()  : array<string|int, mixed>
Fetch records from the history table.
get_rows_data()  : array<int, array<string, mixed>>
Return raw rows as an array of associative arrays for API consumption.
get_table_name()  : string
Get the history table name.
pagination()  : string|void
search()  : string
search_help()  : string
Show search help.
add_where()  : string
get_all_logs()  : string|null
get_dates()  : array<string|int, mixed>|object|array<string|int, stdClass>|null
get_row()  : string|null
get_table_footer()  : string
get_table_header()  : string
no_item()  : string|null
render_data()  : string
Render the HTML rows for the legacy table output.
scrub_description()  : string
Scrub the leading metadata header from the description when present.

Constants

Properties

Methods

__construct()

MySLP_History_Table constructor.

public __construct([array<string|int, mixed> $data = array() ]) : mixed
Parameters
$data : array<string|int, mixed> = array()

get_records()

Fetch records from the history table.

public static get_records([string $since = '1970-01-01 00:00:00' ][, string $like = '' ]) : array<string|int, mixed>
Parameters
$since : string = '1970-01-01 00:00:00'
$like : string = ''
Return values
array<string|int, mixed>

get_rows_data()

Return raw rows as an array of associative arrays for API consumption.

public get_rows_data() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>

get_table_name()

Get the history table name.

public static get_table_name() : string
Return values
string

get_dates()

private get_dates() : array<string|int, mixed>|object|array<string|int, stdClass>|null
Return values
array<string|int, mixed>|object|array<string|int, stdClass>|null

render_data()

Render the HTML rows for the legacy table output.

private render_data(array<int, array<string, mixed>> $data) : string
Parameters
$data : array<int, array<string, mixed>>
Return values
string

scrub_description()

Scrub the leading metadata header from the description when present.

private scrub_description(string $html) : string

Rules (per issue description):

  • Only if the description starts with the exact pattern beginning at the start: Blog ID:
  • Remove everything from that start through the first
    that follows the exact string Customer Name:
  • Use exact tag/label casing; only
    variant.
  • If a result is empty after trimming, the caller may skip the row.
Parameters
$html : string
Return values
string
On this page

Search results