Config Class Reference

CMSkey configuration. More...

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 getBaseURL ()
 Get base URL.
 initConfig ($id_area=0)
 Init configuration.
 getConfig ($varname)
 Get a configuration value.
 setConfig ($varname, $value)
 Set a configuration value.
 saveConfig ()
 Save current configuration in table `config`.
 getAreaId ()
 Get the container ids and names array.

Public Attributes

const CMSKEY_VERSION = "0.9.5-devel"
 CMSkey version number.
const DEFAULT_AREA_ID = 1

Private Member Functions

 getHostName ()
 Get the host and domain names of the web site.

Private Attributes

 $areaid = Config::DEFAULT_AREA_ID
 $config = array()


Detailed Description

CMSkey configuration.

All static system-wide configuration is in the file /etc/cmskey/config.domain_name.php.

This class retrieves all configuration values from table config.

Configuration values can be modified by the CMS (super)administrators.

List of available configuration settings:

 +--------------------------------------------------------------+-----------------------------+
 | name                 | visible | description                 | notes                       |
 +----------------------+---------+-----------------------------|-----------------------------+
 | DEFAULT_LANG         |    0    | default language (code)     |                             |
 | DEFAULT_PAGE         |    0    | default page                |                             |
 | FILES_ROOTDIR        |    0    | file upload root dir        |                             |
 | FOOTER_TEXT          |    1    | additional text in footer   |                             |
 | LANGUAGES            |    0    | available languages (codes) |                             |
 | LAST_VER_CHECKED     |    0    | last version checked        |                             |
 | LAYOUT_BORDER_DX     |    0    | distance from border (px)   | used if LAYOUT_TYPE == L    |
 | LAYOUT_COLOR_CENTER  |    0    | hex RGB center bkcolor      |                             |
 | LAYOUT_COLOR_LEFT    |    0    | hex RGB left bkcolor        |                             |
 | LAYOUT_COLOR_RIGHT   |    0    | hex RGB right bkcolor       |                             |
 | LAYOUT_COLS          |    0    | no. of columns [1|2|3]      |                             |
 | LAYOUT_LOGO_HEIGHT   |    0    | logo height (pixel)         |                             |
 | LAYOUT_LOGO_WIDTH    |    0    | logo width (pixel)          |                             |
 | LAYOUT_RAIL_POS      |    0    | [L = left|R = right]        | ignored if LAYOUT_COLS == 3 |
 | LAYOUT_TYPE          |    0    | [F = fixed|L = liquid]      |                             |
 | LAYOUT_WIDTH_CENTER  |    0    | center column width (pixel) |                             |
 | LAYOUT_WIDTH_LEFT    |    0    | left column width (pixel)   |                             |
 | LAYOUT_WIDTH_RIGHT   |    0    | right column width (pixel)  |                             |
 | LOGIN_LINK_VISIBLE   |    1    | login link visibility       |                             |
 | LOGO                 |    0    | logo image path (relative)  |                             |
 | LOG_ENABLED          |    1    | event log enabled ('Y'|'N') |                             |
 | LOG_ENTRIES_LIFETIME |    1    | log entries lifetime (days) |                             |
 | SESSION_LIFETIME     |    0    | session lifetime (minutes)  |                             |
 | SITE_TITLE           |    0    | default website title       |                             |
 | SVPREFIX             |    0    | session var prefix          |                             |
 | TOPBAR_VISIBLE       |    1    | topbar visible [0|1]        |                             |
 +----------------------+---------+-----------------------------+-----------------------------+

Definition at line 77 of file config.php.


Constructor & Destructor Documentation

Config::__construct (  ) 

Constructor.

Retrieve system configuration.

Definition at line 114 of file config.php.

References initConfig().


Member Function Documentation

Config::getHostName (  )  [private]

Get the host and domain names of the web site.

Returns:
(string) host and domain names

Definition at line 148 of file config.php.

Referenced by getBaseURL().

Config::getBaseURL (  ) 

Get base URL.

Get base URL terminated by the character '/'.

Returns:
(string) base URL

Definition at line 159 of file config.php.

References getHostName().

Config::initConfig ( id_area = 0  ) 

Init configuration.

Superadmins can switch from one area to another.

Parameters:
id_area (optional) set a new area id and reload the configuration

Definition at line 172 of file config.php.

References $db, and CMSKEY_VERSION.

Referenced by __construct().

Config::getConfig ( varname  ) 

Get a configuration value.

Parameters:
varname configuration var name
Returns:
(mixed) configuration value

Definition at line 198 of file config.php.

Config::setConfig ( varname,
value 
)

Set a configuration value.

Parameters:
varname configuration var name to set
value value to set

Definition at line 208 of file config.php.

Config::saveConfig (  ) 

Save current configuration in table `config`.

FIXME Only allowed administrator should call this function!

Definition at line 217 of file config.php.

Config::getAreaId (  ) 

Get the container ids and names array.

Returns:
ids and names array Get the area id

(int) area id

Definition at line 240 of file config.php.


Member Data Documentation

const Config::CMSKEY_VERSION = "0.9.5-devel"

CMSkey version number.

Definition at line 78 of file config.php.

Referenced by CMSkey::getFooter(), and initConfig().

const Config::DEFAULT_AREA_ID = 1

Definition at line 79 of file config.php.

Config::$areaid = Config::DEFAULT_AREA_ID [private]

Definition at line 86 of file config.php.

Config::$config = array() [private]

Definition at line 93 of file config.php.


The documentation for this class was generated from the following file:
Generated on Fri Feb 22 11:19:48 2008 for CMSkey by  doxygen 1.5.3