SLP_AddOn
extends SLPlus_BaseClass_Object
in package
Details about an Add On
Tags
Table of Contents
Constants
- TRANSIENT_BASE = 'slp_addon_'
Properties
- $addon : object
- $instance : mixed
- $myslp : MySLP
- $slplus : SLPlus
- $slug : mixed
- $uses_myslp : bool
- $uses_slplus : bool
- $active : mixed
- $cache : mixed
- $latest_version : mixed
- $name : mixed
- $version : mixed
- $was_active : mixed
Methods
- __construct() : mixed
- __get() : mixed
- Get a property.
- __isset() : bool
- Allow isset to be called on private properties.
- __toString() : string
- For sanitize_key filters that FUBAR the sanitize_key method in the constructor.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- set_properties() : mixed
- Set our properties.
- initialize() : mixed
- Do these things when this object is invoked. Override in your class.
- _get_active() : bool|mixed
- Get active.
- _get_cache() : mixed
- Get cache.
- _get_latest_version() : string
- Get the latest version from the update server.
- _get_name() : string
- Get name.
- _get_version() : string
- Get version of an active instance. Also sets active property.
- _get_was_active() : bool
- Get was_active.
- cache_me_if_you_can() : mixed
- Cache a copy of this add on less instance.
Constants
TRANSIENT_BASE
public
mixed
TRANSIENT_BASE
= 'slp_addon_'
Properties
$addon
public
object
$addon
$instance
public
mixed
$instance
$myslp
public
MySLP
$myslp
$slplus
public
SLPlus
$slplus
$slug
public
mixed
$slug
$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.
$active
private
mixed
$active
$cache
private
mixed
$cache
$latest_version
private
mixed
$latest_version
$name
private
mixed
$name
$version
private
mixed
$version
$was_active
private
mixed
$was_active
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
Get a property.
public
__get(mixed $property) : mixed
Parameters
- $property : mixed
Tags
__isset()
Allow isset to be called on private properties.
public
__isset(mixed $property) : bool
Parameters
- $property : mixed
Return values
bool__toString()
For sanitize_key filters that FUBAR the sanitize_key method in the constructor.
public
__toString() : string
This should not be necessary, but some plugins and themes are broken.
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
staticset_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
initialize()
Do these things when this object is invoked. Override in your class.
protected
initialize() : mixed
_get_active()
Get active.
private
_get_active() : bool|mixed
Tags
Return values
bool|mixed_get_cache()
Get cache.
private
_get_cache() : mixed
Tags
_get_latest_version()
Get the latest version from the update server.
private
_get_latest_version() : string
Tags
Return values
string_get_name()
Get name.
private
_get_name() : string
Tags
Return values
string_get_version()
Get version of an active instance. Also sets active property.
private
_get_version() : string
Tags
Return values
string_get_was_active()
Get was_active.
private
_get_was_active() : bool
Tags
Return values
boolcache_me_if_you_can()
Cache a copy of this add on less instance.
private
cache_me_if_you_can() : mixed