Changeset 468 for trunk/lib/Prefs.inc.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/lib/Prefs.inc.php
r463 r468 55 55 56 56 // Namespace of this instance of Prefs. 57 var$_ns;57 private $_ns; 58 58 59 59 // Configuration parameters for this object. 60 var$_params = array(60 private $_params = array( 61 61 62 62 // Enable database storage. If this is false, all prefs will live only as long as the session. … … 80 80 * Prefs constructor. 81 81 */ 82 function Prefs($namespace='')82 public function __construct($namespace='') 83 83 { 84 84 $app =& App::getInstance(); … … 104 104 * @since 04 Jun 2006 16:41:42 105 105 */ 106 function initDB($recreate_db=false)106 public function initDB($recreate_db=false) 107 107 { 108 108 $app =& App::getInstance(); … … 142 142 * @param array $params Array of param keys and values to set. 143 143 */ 144 function setParam($params=null)144 public function setParam($params=null) 145 145 { 146 146 if (isset($params) && is_array($params)) { … … 157 157 * @return mixed Configured parameter value. 158 158 */ 159 function getParam($param)159 public function getParam($param) 160 160 { 161 161 $app =& App::getInstance(); … … 176 176 * @param array $defaults Array of key-value pairs 177 177 */ 178 function setDefaults($defaults)178 public function setDefaults($defaults) 179 179 { 180 180 if (isset($defaults) && is_array($defaults)) { … … 192 192 * @param bool $persistent Save this value forever? Set to false and value will exist as long as the session is in use. 193 193 */ 194 function set($key, $val)194 public function set($key, $val) 195 195 { 196 196 $app =& App::getInstance(); … … 223 223 * @return string The value of the preference. 224 224 */ 225 function get($key)225 public function get($key) 226 226 { 227 227 $app =& App::getInstance(); … … 244 244 * @return boolean True if the preference isset and not empty false otherwise. 245 245 */ 246 function exists($key)246 public function exists($key) 247 247 { 248 248 return array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['saved']); … … 254 254 * @param string $key The name of the preference to delete. 255 255 */ 256 function delete($key)256 public function delete($key) 257 257 { 258 258 unset($_SESSION['_prefs'][$this->_ns]['saved'][$key]); … … 263 263 * as $auth->clear(), such as when logging out. 264 264 */ 265 function clear($focus='all')265 public function clear($focus='all') 266 266 { 267 267 switch ($focus) { … … 295 295 * @since 04 Jun 2006 16:56:53 296 296 */ 297 function load($force=false)297 public function load($force=false) 298 298 { 299 299 $app =& App::getInstance(); … … 352 352 * @since 04 Jun 2006 17:12:44 353 353 */ 354 function _isLoaded()354 private function _isLoaded() 355 355 { 356 356 if (isset($_SESSION['_prefs'][$this->_ns]['load_datetime']) … … 373 373 * @since 04 Jun 2006 17:19:56 374 374 */ 375 function save()375 public function save() 376 376 { 377 377 $app =& App::getInstance(); … … 424 424 } 425 425 426 427 ?>
Note: See TracChangeset
for help on using the changeset viewer.