Store Locator Plus®

SLP_Object_WithOptions extends SLP_Object_With_Objects
in package

Class SLP_Object_WithOptions

Table of Contents

Properties

$class_prefix  : string
$class_prefix  : string
$dir  : mixed
$dir  : string
$dir  : string
$objects  : array<string|int, mixed>
$objects  : array<string|int, mixed>
$option_name  : string
$options  : array<string|int, mixed>
$slplus  : SLPlus
$uses_slplus  : bool
$class_prefix  : mixed
$objects  : mixed
$option_name  : mixed
$options  : mixed
$slplus  : mixed
$uses_slplus  : mixed

Methods

__construct()  : mixed
__get()  : mixed
Get the value, running it through a filter.
__isset()  : bool
Allow isset to be called on private properties.
__set()  : SLP_Option|null
Allow value to be set directly.
add_object()  : mixed
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
get_option()  : mixed
Get an option attribute.
instantiate()  : null|object
Instantiate an object of the noted class.
load_options()  : mixed
Grab the specified option from wp_options and put it on top of any default values we've got.
set_option()  : bool
Set an option attribute.
set_properties()  : mixed
Set our properties.
at_startup()  : mixed
Things to do at startup after this baby is initialized. Override in your class.
initialize()  : mixed
Do these things when this object is invoked. Override in your class.
set_default_object_options()  : mixed
Set default options for objects. Override in your class.
augment_class()  : string
Augment the class names so we can reference simple property names.
auto_instantiate()  : mixed
Any object with auto_instantiate set to true is instantiate during initialization.

Properties

$objects

public array<string|int, mixed> $objects

key = class name, array of attributes() object = the instantiated object subdir = the subdirectory (from theme root) that contains the class definition

$objects

public array<string|int, mixed> $objects

key = class name, array of attributes() auto_instantiate = true , instantiate the object when this object initializes object = the instantiated object options = default startup options subdir = the subdirectory (from theme root) that contains the class definition

$options

public array<string|int, mixed> $options

key = option slug, array of attributes() value = the value of the option

$uses_slplus

public bool $uses_slplus

Set to true (default) if the object needs access to the SLPlus plugin object.

Methods

__construct()

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

__get()

Get the value, running it through a filter.

public __get(string $property) : mixed
Parameters
$property : string
Return values
mixed

null if not set or the value

__isset()

Allow isset to be called on private properties.

public __isset(string $property) : bool
Parameters
$property : string
Return values
bool

get_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_Object

get_option()

Get an option attribute.

public get_option(string $property, string $attribute) : mixed
Parameters
$property : string
$attribute : string

instantiate()

Instantiate an object of the noted class.

public instantiate(string $class[, array<string|int, mixed> $options = array() ]) : null|object
Parameters
$class : string
$options : array<string|int, mixed> = array()
Return values
null|object

load_options()

Grab the specified option from wp_options and put it on top of any default values we've got.

public load_options() : mixed

set_option()

Set an option attribute.

public set_option(string $property, string $attribute, mixed $value) : bool
Parameters
$property : string
$attribute : string
$value : mixed
Return values
bool

set_properties()

Set our properties.

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

at_startup()

Things to do at startup after this baby is initialized. Override in your class.

protected at_startup() : mixed

initialize()

Do these things when this object is invoked. Override in your class.

protected initialize() : mixed

set_default_object_options()

Set default options for objects. Override in your class.

protected set_default_object_options() : mixed

augment_class()

Augment the class names so we can reference simple property names.

private augment_class(string $class) : string
Parameters
$class : string
Return values
string

auto_instantiate()

Any object with auto_instantiate set to true is instantiate during initialization.

private auto_instantiate() : mixed

        
On this page

Search results