SLP_Power_Category_Data
extends SLPlus_BaseClass_Object
in package
The data interface helper for the persistent data store (MySQL).
Table of Contents
Properties
- $addon : SLPPower
- $addon : mixed
- $collate : string
- $collate : mixed
- $db : wpdb
- $db : mixed
- $plugintable : array<string|int, string>
- $plugintable : mixed
- $slplus : SLPlus
- $uses_slplus : bool
- $where_clause : string
- $where_clause : mixed
- $slplus : mixed
- $uses_slplus : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_where_location_has_category() : string
- Extend the current where clause to also filter by the categories selected.
- get_instance() : SLPlus_BaseClass_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- get_Record() : array<string|int, mixed>
- Return a record as an array based on a given SQL select statement keys and params list.
- get_SQL() : string
- Get an SQL statement for this database.
- initialize() : mixed
- Startup things.
- set_DB_charset() : mixed
- Set the database character set
- set_properties() : mixed
- Set our properties.
Properties
$addon
public
SLPPower
$addon
$addon
public
mixed
$addon
$collate
public
string
$collate
The collate modifier for create table commands.
$collate
public
mixed
$collate
$db
public
wpdb
$db
$db
public
mixed
$db
$plugintable
public
array<string|int, string>
$plugintable
Properties of the plugin data table.
$plugintable
public
mixed
$plugintable
$slplus
public
SLPlus
$slplus
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$where_clause
public
string
$where_clause
The SQL where clause.
$plugintable 'name' = table name 'fields' = key/value pair key = field name, value = field format
$where_clause
public
mixed
$where_clause
= ''
$slplus
protected
mixed
$slplus
$uses_slplus
protected
mixed
$uses_slplus
= \true
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booladd_where_location_has_category()
Extend the current where clause to also filter by the categories selected.
public
add_where_location_has_category(string $where, string $category_list) : string
Parameters
- $where : string
-
existing where clause
- $category_list : string
-
comma separated list of categories
Return values
stringget_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([bool $no_global = false ][, mixed $params = array() ]) : SLPlus_BaseClass_Object
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object
Parameters
- $no_global : bool = false
-
set to true to skip assigning object to SLP global as a property.
- $params : mixed = array()
-
object init params
Return values
SLPlus_BaseClass_Objectget_Record()
Return a record as an array based on a given SQL select statement keys and params list.
public
get_Record(string|array<string|int, string> $commandList[, array<string|int, mixed> $params = array() ][, int $offset = 0 ]) : array<string|int, mixed>
Parameters
- $commandList : string|array<string|int, string>
- $params : array<string|int, mixed> = array()
- $offset : int = 0
Return values
array<string|int, mixed>get_SQL()
Get an SQL statement for this database.
public
get_SQL(string|array<string|int, string> $commandList) : string
Parameters
- $commandList : string|array<string|int, string>
Return values
stringinitialize()
Startup things.
public
initialize() : mixed
set_DB_charset()
Set the database character set
public
set_DB_charset() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()