comparison Options.inc @ 39:bd82b719a0de

Make CacheTimeCheck a singleton. Robustify if_modified_since check. Quiet warnings. Set debug levels. Fix basepath references.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Fri, 05 Oct 2012 00:21:27 +0200
parents aec57ed6f5f6
children 66382989353f
comparison
equal deleted inserted replaced
38:42533600214b 39:bd82b719a0de
6 private $name; 6 private $name;
7 private $acceptedLanguages = array(); 7 private $acceptedLanguages = array();
8 private $inputDefaults = array(); 8 private $inputDefaults = array();
9 private $cache; 9 private $cache;
10 private $urlParams = array(); 10 private $urlParams = array();
11 private $basePath;
11 12
12 function getDefaultLang() 13 function getDefaultLang()
13 { 14 {
14 return $this->defaultLang; 15 return $this->defaultLang;
15 } 16 }
22 function setLang($lang) 23 function setLang($lang)
23 { 24 {
24 $this->lang = $lang; 25 $this->lang = $lang;
25 } 26 }
26 27
28 function getBasePath()
29 {
30 return $this->basePath;
31 }
32
33 function setBasePath($basePath)
34 {
35 $this->basePath = $basePath;
36 }
37
27 function setUrlParams($urlParams) 38 function setUrlParams($urlParams)
28 { 39 {
29 foreach($urlParams as $key) { 40 foreach($urlParams as $key) {
30 $value = $_GET[$key]; 41 $value = array_key_exists($key, $_GET) ? $_GET[$key] : '';
31 if (!$value)
32 $value = '';
33 $this->urlParams[$key] = $value; 42 $this->urlParams[$key] = $value;
34 } 43 }
35 } 44 }
36 45
37 function getUrlParams() 46 function getUrlParams()