CMS Made Simple API

cms_siteprefs
in package

FinalYes

A class for working with site preferences

Tags
license

GPL

since
1.10
author

Robert Campbell (calguy1000@cmsmadesimple.org)

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
bool

get()

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
string

list_by_prefix()

List preferences by prefix.

public static list_by_prefix(string $prefix) : mixed
Parameters
$prefix : string
Tags
since
2.0
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


        
On this page

Search results