Clears memory of cached options
static
void
clear_cache
()
Shortcut to unset an option in the options table
static
void
delete
(string $name)
-
string
$name: The name of the option
Shortcut to return the value of an option
list
($foo, $bar, $baz) =
Options::get('foo1', 'bar2', 'baz3'); //or
list
($foo, $bar, $baz) =
Options::get(array('foo1', 'bar2', 'baz3')); // useful with array_keys()
static
mixed
get
( $name, string|array $name...)
-
string|array
$name...: The name(s) of the option(s) to retrieve
-
$name
Fetch a group of options with a specific prefix Useful for plugins that use FormUI to automatically store options with the plugin's prefix.
static
array
get_group
(string $prefix)
-
string
$prefix: The prefix to fetch
Enables singleton working properly
static
void
instance
()
Redefinition of:
- Singleton::instance()
- Declarations that extend this method must have the same signature (arguments and returned types) to pass E_STRICT
Shortcut to output the value of an option
static
void
out
(string $name)
-
string
$name: Name of the option to output
function set Shortcut to set the value of an option
static
void
set
(string $name, [mixed $value = ''])
-
string
$name: Name of the option to set
-
mixed
$value: New value of the option to store
Fetch all options from the options table into local storage
void
get_all_options
()
Retrieve an option value
mixed
__get
(string $name)
-
string
$name: Name of the option to get
Applies the option value to the options table
void
__set
(string $name, mixed $value)
-
string
$name: Name of the option to set
-
mixed
$value: Value to set
Removes an option from the options table
void
__unset
(string $name)
-
string
$name: The name of the option
Inherited Methods
Inherited From Singleton
Singleton::__construct()
Singleton::getInstanceOf()
Singleton::instance()