Dotclear 2.24
Loading...
Searching...
No Matches
dcSettings Class Reference

Public Member Functions

 __construct ($blog_id)
 
 addNamespace (string $namespace)
 
 renNamespace (string $old_namespace, string $new_namespace)
 
 delNamespace (string $namespace)
 
 get (string $namespace)
 
 __get (string $namespace)
 
 exists (string $namespace)
 
 dumpNamespaces ()
 

Protected Attributes

 $con
 
 $table
 
 $blog_id
 
 $namespaces = []
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $blog_id)

Object constructor. Retrieves blog settings and puts them in $namespaces array. Local (blog) settings have a highest priority than global settings.

Parameters
mixed$blog_idThe blog identifier

References $blog_id, dcCore\app(), and dcNamespace\NS_TABLE_NAME.

Member Function Documentation

◆ addNamespace()

addNamespace ( string  $namespace)

Create a new namespace. If the namespace already exists, return it without modification.

Parameters
string$namespaceNamespace name
Returns
dcNamespace

References exists().

Referenced by antispamBehaviors\adminBeforeBlogSettingsUpdate().

◆ renNamespace()

renNamespace ( string  $old_namespace,
string  $new_namespace 
)

Rename a namespace.

Parameters
string$old_namespaceThe old ns
string$new_namespaceThe new ns
Exceptions
Exception
Returns
bool return true if no error, else false

References exists(), and dcNamespace\NS_NAME_SCHEMA.

◆ delNamespace()

delNamespace ( string  $namespace)

Delete a whole namespace with all settings pertaining to it.

Parameters
string$namespaceNamespace name
Returns
bool

References exists().

◆ get()

get ( string  $namespace)

Returns full namespace with all settings pertaining to it.

Parameters
string$namespaceNamespace name
Returns
dcNamespace

◆ __get()

__get ( string  $namespace)

Magic __get method.

Parameters
string$namespacenamespace name
Returns
dcNamespace

◆ exists()

exists ( string  $namespace)

Check if a namespace exists

Parameters
string$namespaceNamespace name
Returns
bool

Referenced by addNamespace(), delNamespace(), and renNamespace().

◆ dumpNamespaces()

dumpNamespaces ( )

Dumps namespaces.

Returns
array

References $namespaces.

Field Documentation

◆ $con

$con
protected

◆ $table

$table
protected

◆ $blog_id

$blog_id
protected

Referenced by __construct().

◆ $namespaces

$namespaces = []
protected

Referenced by dumpNamespaces().


The documentation for this class was generated from the following file: