cms_siteprefs
in package
FinalYes
A class for working with site preferences
Tags
Table of Contents
Methods
- exists() : bool
- Test if a site preference exists
- get() : string
- Retrieve a site preference
- list_by_prefix() : mixed
- List preferences by prefix.
- remove() : mixed
- Remove a site preference
- set() : mixed
- Set a site preference
Methods
exists()
Test if a site preference exists
public
static exists(string $key) : bool
Parameters
- $key : string
-
The preference name
Return values
boolget()
Retrieve a site preference
public
static get(string $key[, string $dflt = '' ]) : string
Parameters
- $key : string
-
The preference name
- $dflt : string = ''
-
Optional default value
Return values
stringlist_by_prefix()
List preferences by prefix.
public
static list_by_prefix(string $prefix) : mixed
Parameters
- $prefix : string
Tags
Return values
mixed —list of preferences name that match the prefix, or null
remove()
Remove a site preference
public
static remove(string $key[, bool $like = FALSE ]) : mixed
Parameters
- $key : string
-
The preference name
- $like : bool = FALSE
-
Whether to use preference name approximation
set()
Set a site preference
public
static set(string $key, string $value) : mixed
Parameters
- $key : string
-
The preference name
- $value : string
-
The preference value