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 : mixed
- $collate : mixed
- $db : mixed
- $myslp : MySLP
- $plugintable : mixed
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $where_clause : mixed
- $slug : 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() : static
- 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
mixed
$addon
$collate
public
mixed
$collate
$db
public
mixed
$db
$myslp
public
MySLP
$myslp
$plugintable
public
mixed
$plugintable
$slplus
public
SLPlus
$slplus
$uses_myslp
public
bool
$uses_myslp
Set to true to add a $myslp property pointing to global $myslp
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$where_clause
public
mixed
$where_clause
= ''
$slug
protected
mixed
$slug
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() ]) : static
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
staticget_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()