# HG changeset patch # User Tom Fredrik Blenning Klaussen # Date 1349991673 -7200 # Node ID 62b9d7a35658a272271cb825b11aa6df60392881 # Parent dd4ddedca4c54d942c959a9878ecc5e4310aeafb Fix documentation regressions. diff -r dd4ddedca4c5 -r 62b9d7a35658 FileCacheSet.inc --- a/FileCacheSet.inc Thu Oct 11 23:32:14 2012 +0200 +++ b/FileCacheSet.inc Thu Oct 11 23:41:13 2012 +0200 @@ -5,17 +5,30 @@ $cache = ScriptIncludeCache::instance(__FILE__); $cache->cache_time("${baseDir}/Logger.inc"); +/** + * Caches a set of file with timestamps + */ class FileCacheSet { private $newest = 0; private $files = array(); private $parentCaches = array(); + /** + * Constructs a FileCacheSet object + * + * @param $parent optional linked parent cache to sync with + */ protected function __construct($parent = null) { if ($parent) { $this->addParent($parent); } } + /** + * Links up a parent cache + * + * @param $parent cache we should sync with + */ protected function addParent($parent) { array_push($this->parentCaches, $parent); @@ -63,6 +76,11 @@ } } + /** + * Find the newest member of the combined cacheset + * + * @return timestamp of newest member + */ function getNewest() { $newest = 0; @@ -74,6 +92,11 @@ } } +/** + * Singleton class, keeps track of all scriptfile includes + * + * This class is typically used as a parent class of another cache + */ class ScriptIncludeCache extends FileCacheSet { private static $myInstance = 0;