Umfragen
config Class Reference

holds and manipulates the config and exports constants More...

Public Member Functions

 __construct ($db)
 constructor
 define_constants ()
 registers globals and constants from the internal data
 load_defaults ($override=false)
 loads default values
 load ()
 loads the config from the database
 save ($name)
 saves a specific variable to the database
 save_all ()
 saves all config variables present to the database
 set ($name, $value)
 sets a config variable after checking it's validity
 get ($name)
 gets a value from the config stack
 display_app_root_url_edit ()
 displays the GUI for setting APP_ROOT_URL
 handle_app_root_url_edit ()
 display_analytics_file_edit ()
 displays the GUI for setting ANALYTICS_HTML_INCLUDE_FILE
 handle_analytics_file_edit ()
 display_teacher_group_edit (array $list)
 displays the GUI for setting TEACHER_GROUP
 handle_teacher_group_edit (array $list)
 display_groups_whitelist_edit (array $list)
 displays the GUI for setting GROUPS_WHITELIST
 handle_groups_whitelist_edit (array $list)
 display_enable_email_edit ()
 displays the GUI for setting EMAIL_ENABLE
 handle_enable_email_edit ()
 display_email_method_edit ()
 displays the GUI for setting EMAIL_METHOD
 handle_email_method_edit ()
 display_email_send_method_edit ()
 displays the GUI for setting EMAIL_SEND_ENABLE
 handle_email_send_method_edit ()
 display_email_auth_encryption_edit ()
 displays the GUI for setting EMAIL_AUTL_ENCRYPTION
 handle_email_auth_encryption_edit ()
 display_email_smtp_server_edit ()
 displays the GUI for setting EMAIL_SMPT_SERVER
 handle_email_smtp_server_edit ()
 display_email_smtp_port_edit ()
 displays the GUI for setting EMAIL_SMPT_PORT
 handle_email_smtp_port_edit ()
 display_email_smtp_username_edit ()
 displays the GUI for setting EMAIL_SMTP_USERNAME
 handle_email_smtp_username_edit ()
 display_email_smtp_password_edit ()
 displays the GUI for setting EMAIL_SMTP_PASSWORD
 handle_email_smtp_password_edit ()
 display_email_address_edit ()
 displays the GUI for setting EMAIL_ADDRESS
 handle_email_address_edit ()
 display_email_name_edit ()
 displays the GUI for setting EMAIL_NAME
 handle_email_name_edit ()
 display_email_groups_edit (array $grouplist)
 displays the GUI for setting TEACHER_GROUP
 handle_email_groups_edit (array $grouplist)

Private Attributes

 $data = array()
 holds all config variables

Detailed Description

holds and manipulates the config and exports constants

Definition at line 34 of file config.class.php.

Constructor & Destructor Documentation

__construct (   $db)

constructor

Parameters
db$dba database object. no database, No config
Exceptions
exceptionwhen the object passed is not a database object

Definition at line 43 of file config.class.php.

Member Function Documentation

define_constants ( )

registers globals and constants from the internal data

Only variable uppercase names are exported

Definition at line 56 of file config.class.php.

display_analytics_file_edit ( )

displays the GUI for setting ANALYTICS_HTML_INCLUDE_FILE

Definition at line 402 of file config.class.php.

display_app_root_url_edit ( )

displays the GUI for setting APP_ROOT_URL

Definition at line 388 of file config.class.php.

display_email_address_edit ( )

displays the GUI for setting EMAIL_ADDRESS

Definition at line 656 of file config.class.php.

display_email_auth_encryption_edit ( )

displays the GUI for setting EMAIL_AUTL_ENCRYPTION

Definition at line 561 of file config.class.php.

display_email_groups_edit ( array  $grouplist)

displays the GUI for setting TEACHER_GROUP

Parameters
array$listthe list of groups given by auth::get_all_groups()

Definition at line 687 of file config.class.php.

display_email_method_edit ( )

displays the GUI for setting EMAIL_METHOD

Definition at line 509 of file config.class.php.

display_email_name_edit ( )

displays the GUI for setting EMAIL_NAME

Definition at line 671 of file config.class.php.

display_email_send_method_edit ( )

displays the GUI for setting EMAIL_SEND_ENABLE

Definition at line 535 of file config.class.php.

display_email_smtp_password_edit ( )

displays the GUI for setting EMAIL_SMTP_PASSWORD

Definition at line 632 of file config.class.php.

display_email_smtp_port_edit ( )

displays the GUI for setting EMAIL_SMPT_PORT

Definition at line 602 of file config.class.php.

display_email_smtp_server_edit ( )

displays the GUI for setting EMAIL_SMPT_SERVER

Definition at line 587 of file config.class.php.

display_email_smtp_username_edit ( )

displays the GUI for setting EMAIL_SMTP_USERNAME

Definition at line 617 of file config.class.php.

display_enable_email_edit ( )

displays the GUI for setting EMAIL_ENABLE

Definition at line 483 of file config.class.php.

display_groups_whitelist_edit ( array  $list)

displays the GUI for setting GROUPS_WHITELIST

Parameters
array$listthe list of groups given by auth::get_all_groups()

Definition at line 451 of file config.class.php.

display_teacher_group_edit ( array  $list)

displays the GUI for setting TEACHER_GROUP

Parameters
array$listthe list of groups given by auth::get_all_groups()

Definition at line 418 of file config.class.php.

get (   $name)

gets a value from the config stack

Parameters
string$namethe name of the variable we want to retrieve
Returns
mixed the value or a default value when the variable is not set

Definition at line 273 of file config.class.php.

handle_analytics_file_edit ( )

Definition at line 408 of file config.class.php.

handle_app_root_url_edit ( )

Definition at line 393 of file config.class.php.

handle_email_address_edit ( )

Definition at line 662 of file config.class.php.

handle_email_auth_encryption_edit ( )

Definition at line 574 of file config.class.php.

handle_email_groups_edit ( array  $grouplist)

Definition at line 705 of file config.class.php.

handle_email_method_edit ( )

Definition at line 522 of file config.class.php.

handle_email_name_edit ( )

Definition at line 677 of file config.class.php.

handle_email_send_method_edit ( )

Definition at line 548 of file config.class.php.

handle_email_smtp_password_edit ( )

Definition at line 643 of file config.class.php.

handle_email_smtp_port_edit ( )

Definition at line 608 of file config.class.php.

handle_email_smtp_server_edit ( )

Definition at line 593 of file config.class.php.

handle_email_smtp_username_edit ( )

Definition at line 623 of file config.class.php.

handle_enable_email_edit ( )

Definition at line 496 of file config.class.php.

handle_groups_whitelist_edit ( array  $list)

Definition at line 468 of file config.class.php.

handle_teacher_group_edit ( array  $list)

Definition at line 435 of file config.class.php.

load ( )

loads the config from the database

Definition at line 95 of file config.class.php.

load_defaults (   $override = false)

loads default values

Parameters
bool$overrideif true, then overwrite existing config

Definition at line 86 of file config.class.php.

save (   $name)

saves a specific variable to the database

Parameters
string$nameconfiguration variable name we want save

Definition at line 114 of file config.class.php.

save_all ( )

saves all config variables present to the database

Returns
bool true

Definition at line 125 of file config.class.php.

set (   $name,
  $value 
)

sets a config variable after checking it's validity

Parameters
string$namevariables name we want set
mixed$valuethe value we want set
Returns
bool true on success string with error message on failure

Definition at line 138 of file config.class.php.

Field Documentation

$data = array()
private

holds all config variables

Definition at line 36 of file config.class.php.


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