phpDocumentor plugins
[ class tree: plugins ] [ index: plugins ] [ all elements ]

Class: PluginSettings

Source Location: /qp_inc/plugins/model/_pluginsettings.class.php

Class PluginSettings

Class Overview

Class to handle settings for plugins

Located in /qp_inc/plugins/model/_pluginsettings.class.php [line 41]

AbstractSettings
   |
   --PluginSettings

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From AbstractSettings

AbstractSettings::$all_loaded
AbstractSettings::$cache
AbstractSettings::$cache_by_col_keys
AbstractSettings::$col_key_names
AbstractSettings::$col_value_name
AbstractSettings::$db_table_name
AbstractSettings::$_defaults

Inherited From AbstractSettings

AbstractSettings::AbstractSettings()
Constructor.
AbstractSettings::dbupdate()
Commit changed settings to DB.
AbstractSettings::delete()
Remove a setting.
AbstractSettings::delete_array()
Delete an array of values.
AbstractSettings::get()
Get a setting from the DB settings table.
AbstractSettings::get_cond()
Only set the first variable (passed by reference) if we could retrieve a setting.
AbstractSettings::get_default()
Get the default for the last key of $col_key_names
AbstractSettings::load_all()
Load all settings, disregarding the derived classes setting of $cache_by_col_keys
  • useful if you know that you want to get
all user settings for example.
AbstractSettings::reset()
Reset cache (includes settings to be written to DB).
AbstractSettings::restore_defaults()
Delete values for $_defaults in DB.
AbstractSettings::set()
Temporarily sets a setting (dbupdate() writes it to DB).
AbstractSettings::set_array()
Set an array of values.
AbstractSettings::_load()
Loads the settings. Not meant to be called directly, but gets called when needed.

[ Top ]
Method Summary
PluginSettings   PluginSettings()   Constructor
void   delete()   Delete a setting.
mixed|NULL|false   get()   Get a setting by name for the Plugin.
boolean   set()   Set a Plugin setting. Use dbupdate() to write it to the database.

[ Top ]
Methods
Constructor PluginSettings  [line 48]

  PluginSettings PluginSettings( integer $plugin_ID  )

Constructor

Parameters:
integer   $plugin_ID:  plugin ID where these settings are for


[ Top ]
delete  [line 88]

  void delete( string $setting  )

Delete a setting.

Use dbupdate() to commit it to the database.

Parameters:
string   $setting:  name of setting


Redefinition of:
AbstractSettings::delete()
Remove a setting.

[ Top ]
get  [line 62]

  mixed|NULL|false get( string $setting  )

Get a setting by name for the Plugin.

Parameters:
string   $setting:  The settings name.

API Tags:
Return:  False in case of error, NULL if not found, the value otherwise.


Redefinition of:
AbstractSettings::get()
Get a setting from the DB settings table.

[ Top ]
set  [line 75]

  boolean set( string $setting, string $value  )

Set a Plugin setting. Use dbupdate() to write it to the database.

Parameters:
string   $setting:  The settings name.
string   $value:  The settings value.

API Tags:
Return:  true, if the value has been set, false if it has not changed.


Redefinition of:
AbstractSettings::set()
Temporarily sets a setting (dbupdate() writes it to DB).

[ Top ]