comparison Options.inc @ 99:d98e315308cd

Improved caching of flag and sitemap.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Sun, 14 Sep 2014 21:11:27 +0200
parents 2a8e2f571b24
children df158368051e
comparison
equal deleted inserted replaced
98:f2d52fed708c 99:d98e315308cd
1 <?php 1 <?php
2 /**
3 */
4 abstract class Cacheable {
5 const NO = 0;
6 const YES = 1;
7 const UNDETERMINED = -1;
8 }
9
2 /** 10 /**
3 * Contains alle configurable parameters, and "globals" 11 * Contains alle configurable parameters, and "globals"
4 * 12 *
5 * @author Tom Fredrik Blenning Klaussen 13 * @author Tom Fredrik Blenning Klaussen
6 */ 14 */
14 private $cache; 22 private $cache;
15 private $urlParams = array(); 23 private $urlParams = array();
16 private $basePath; 24 private $basePath;
17 private $flagUrl; 25 private $flagUrl;
18 private $baseUrl; 26 private $baseUrl;
19 private $cacheable = True; 27 private $cacheable = Cacheable::YES;
20 28
21 /** 29 /**
22 * Gets the default language 30 * Gets the default language
23 * 31 *
24 * @return two letter code for the language 32 * @return two letter code for the language
39 } 47 }
40 48
41 /** 49 /**
42 * Sets wether or not this page may be cached 50 * Sets wether or not this page may be cached
43 * 51 *
44 * @param $cacheable bool 52 * @param $cacheable Cacheable
45 */ 53 */
46 function setCacheable($cacheable) 54 function setCacheable($cacheable)
47 { 55 {
48 $this->cacheable = $cacheable; 56 $this->cacheable = $cacheable;
49 } 57 }
50 58
51 /** 59 /**
52 * Gets wether or not this page may be cached 60 * Gets wether or not this page may be cached
53 * 61 *
54 * @return bool, default is True 62 * @return Cacheable, default is YES
55 */ 63 */
56 function getCacheable() 64 function getCacheable()
57 { 65 {
58 return $this->cacheable; 66 return $this->cacheable;
59 } 67 }