C_Photocrati_Settings_Manager

The NextGEN Gallery C Photocrati Settings Manager class.

Defined (1)

The class is defined in the following location(s).

/non_pope/class.photocrati_settings_manager.php  
  1. class C_Photocrati_Settings_Manager extends C_Photocrati_Settings_Manager_Base 
  2. static $_instance = NULL; 
  3. public static function get_instance() 
  4. if (is_null(self::$_instance)) { 
  5. $klass = get_class(); 
  6. self::$_instance = new $klass(); 
  7. return self::$_instance; 
  8.  
  9. function get($key, $default=NULL) 
  10. $retval = parent::get($key, NULL); 
  11.  
  12. if (is_null($retval)) { 
  13. $retval = C_Photocrati_Global_Settings_Manager::get_instance()->get($key, $default); 
  14. return $retval; 
  15.  
  16. function save() 
  17. return update_option(self::$option_name, $this->to_array()); 
  18.  
  19. function load() 
  20. $this->_options = get_option(self::$option_name, array()); 
  21. if (!$this->_options) $this->_options = array(); 
  22. else if (is_string($this->_options)) $this->_options = unserialize($this->_options); 
  23.  
  24. function destroy() 
  25. delete_option(self::$option_name); 
  26.  
  27.