comparison Flag.inc @ 77:9d766788f0bc

Fix remaining documentation errors.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Fri, 12 Oct 2012 01:59:21 +0200
parents fae4322d6c29
children 9b490aa11124
comparison
equal deleted inserted replaced
76:fae4322d6c29 77:9d766788f0bc
5 */ 5 */
6 define(DEBUG,0); 6 define(DEBUG,0);
7 7
8 include_once 'CacheTimeCheck.inc'; 8 include_once 'CacheTimeCheck.inc';
9 9
10 /// @cond
10 $scriptCache = ScriptIncludeCache::instance(__FILE__); 11 $scriptCache = ScriptIncludeCache::instance(__FILE__);
11 $scriptCache->includeOnce('Language.inc'); 12 $scriptCache->includeOnce('Language.inc');
12 $scriptCache->includeOnce('common-functions.inc'); 13 $scriptCache->includeOnce('common-functions.inc');
14 /// @endcond
13 15
16 /**
17 * Functionality for generating a flag based on state options
18 */
14 class Flag { 19 class Flag {
15 private $active; 20 private $active;
16 private $lang; 21 private $lang;
17 private $cache; 22 private $cache;
18 23
24 /**
25 * Constructs a flag object
26 *
27 * @param $masterCache link this objects cache to this masterCache
28 */
19 function __construct($masterCache) 29 function __construct($masterCache)
20 { 30 {
21 $this->active = $_GET['active']; 31 $this->active = $_GET['active'];
22 $lang = $_GET['lang']; 32 $lang = $_GET['lang'];
23 33
42 $this->cache = new CacheTimeCheck($this->name); 52 $this->cache = new CacheTimeCheck($this->name);
43 $this->cache->addParent($masterCache); 53 $this->cache->addParent($masterCache);
44 $this->cache->cache_time($this->name); 54 $this->cache->cache_time($this->name);
45 } 55 }
46 56
57 /**
58 * Produce an apropriate response, eg cached or the actual content
59 */
47 function getPage() 60 function getPage()
48 { 61 {
49 $this->cache->CheckHttpModified(); 62 $this->cache->CheckHttpModified();
50 63
51 $flag = loadFile($this->name); 64 $flag = loadFile($this->name);