1: <?php
2: /**
3: *
4: * @package XCube
5: * @version $Id: XCube_RenderCache.class.php,v 1.3 2008/10/12 04:30:27 minahito Exp $
6: * @copyright Copyright 2005-2007 XOOPS Cube Project <https://github.com/xoopscube/legacy>
7: * @license https://github.com/xoopscube/legacy/blob/master/docs/bsd_licenses.txt Modified BSD license
8: *
9: */
10:
11: class XCube_RenderCache
12: {
13: var $mCacheId = null;
14: var $mResourceName = null;
15:
16: function XCube_RenderCache()
17: {
18: }
19:
20: /**
21: * @return bool
22: */
23: function isCache($cachetime = null)
24: {
25: }
26:
27: /**
28: * @return bool
29: */
30: function enableCache()
31: {
32: return true;
33: }
34:
35: function setResourceName($name)
36: {
37: $this->mResourceName = $name;
38: }
39:
40: /**
41: * @return string
42: */
43: function getCacheId()
44: {
45: }
46:
47: /**
48: * @return string
49: */
50: function _getFileName()
51: {
52: }
53:
54: function save($renderTarget)
55: {
56: if ($this->enableCache()) {
57: $filename = $this->_getFileName();
58: $fp = fopen($filename, "wb");
59: fwrite($fp, $renderTarget->getResult());
60: fclose($fp);
61: }
62: }
63:
64: function load()
65: {
66: if ($this->isCache()) {
67: return file_get_contents($this->_getFileName());
68: }
69: }
70:
71: function clear()
72: {
73: }
74:
75: function reset()
76: {
77: $this->mResourceName = null;
78: }
79: }
80:
81:
82: ?>