cms_siteprefs View code

A class for working with site preferences

package

CMS

license

GPL

since 1.10
author

Robert Campbell (calguy1000@cmsmadesimple.org)

Methods

get(string $key, string $dflt = '') : string

Retrieve a site preference

static

Arguments

string $key

The preference name

string $dflt

Optional default value

Response

string

exists(string $key) : boolean

Test if a site preference exists

static

Arguments

string $key

The preference name

Response

boolean

set(string $key, string $value) 

Set a site preference

static

Arguments

string $key

The preference name

string $value

The preference value

remove(string $key, boolean $like = FALSE) 

Remove a site preference

static

Arguments

string $key

The preference name

boolean $like

Whether to use preference name approximation

list_by_prefix(string $prefix) : mixed

List preferences by prefix.

static

Arguments

string $prefix

Response

mixed

list of preferences name that match the prefix, or null