C_Settings_Model

Class C_Settings_Model.

Defined (1)

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

/products/photocrati_nextgen/modules/nextgen_other_options/package.module.nextgen_other_options.php  
  1. class C_Settings_Model extends C_Component 
  2. /** 
  3. * @var C_NextGen_Settings_Base 
  4. */ 
  5. var $wrapper = NULL; 
  6. static $_instances = array(); 
  7. static function get_instance($context = FALSE) 
  8. if (!isset(self::$_instances[$context])) { 
  9. $klass = get_class(); 
  10. self::$_instances[$context] = new $klass(); 
  11. return self::$_instances[$context]; 
  12. function define($context = FALSE) 
  13. parent::define($context); 
  14. $this->add_mixin('Mixin_Validation'); 
  15. if ($this->has_context('global') or $this->has_context('site')) { 
  16. $this->wrapper = C_NextGen_Settings::get_instance(); 
  17. } else { 
  18. $this->wrapper = C_NextGen_Settings::get_instance(); 
  19. function __get($key) 
  20. return $this->wrapper->get($key); 
  21. function __set($key, $value) 
  22. $this->wrapper->set($key, $value); 
  23. return $this; 
  24. function __isset($key) 
  25. return $this->wrapper->is_set($key); 
  26. function __call($method, $args) 
  27. if (!$this->get_mixin_providing($method)) { 
  28. return call_user_func_array(array(&$this->wrapper, $method), $args); 
  29. } else { 
  30. return parent::__call($method, $args);