1: <?php
2: /**
3: * XOOPS kernel class
4: *
5: * You may not change or alter any portion of this comment or credits
6: * of supporting developers from this source code or any supporting source code
7: * which is considered copyrighted (c) material of the original comment or credit authors.
8: * This program is distributed in the hope that it will be useful,
9: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11: *
12: * @copyright XOOPS Project (http://xoops.org)
13: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
14: * @package kernel
15: * @since 2.0.0
16: * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
17: * @version $Id$
18: */
19:
20: namespace Xoops\Core\Kernel\Handlers;
21:
22: use Xoops\Core\Kernel\Dtype;
23: use Xoops\Core\Kernel\XoopsObject;
24:
25: /**
26: * A Template File
27: *
28: * @category Xoops\Core\Kernel\XoopsTplFile
29: * @package Xoops\Core\Kernel
30: * @author Kazumi Ono <onokazu@xoops.org>
31: * @copyright 2000-2015 XOOPS Project (http://xoops.org)
32: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
33: * @link http://xoops.org
34: */
35: class XoopsTplFile extends XoopsObject
36: {
37: /**
38: * Constructor
39: */
40: public function __construct()
41: {
42: $this->initVar('tpl_id', Dtype::TYPE_INTEGER, null, false);
43: $this->initVar('tpl_refid', Dtype::TYPE_INTEGER, 0, false);
44: $this->initVar('tpl_tplset', Dtype::TYPE_OTHER, null, false);
45: $this->initVar('tpl_file', Dtype::TYPE_TEXT_BOX, null, true, 100);
46: $this->initVar('tpl_desc', Dtype::TYPE_TEXT_BOX, null, false, 100);
47: $this->initVar('tpl_lastmodified', Dtype::TYPE_INTEGER, 0, false);
48: $this->initVar('tpl_lastimported', Dtype::TYPE_INTEGER, 0, false);
49: $this->initVar('tpl_module', Dtype::TYPE_OTHER, null, false);
50: $this->initVar('tpl_type', Dtype::TYPE_OTHER, null, false);
51: $this->initVar('tpl_source', Dtype::TYPE_SOURCE, null, false);
52: }
53:
54: /**
55: * id
56: *
57: * @param string $format Dtype::FORMAT_xxxx constant
58: *
59: * @return mixed
60: */
61: public function id($format = Dtype::FORMAT_NONE)
62: {
63: return $this->getVar('tpl_id', $format);
64: }
65:
66: /**
67: * tpl_id
68: *
69: * @param string $format Dtype::FORMAT_xxxx constant
70: *
71: * @return mixed
72: */
73: public function tpl_id($format = '')
74: {
75: return $this->getVar('tpl_id', $format);
76: }
77:
78: /**
79: * tpl_refid
80: *
81: * @param string $format Dtype::FORMAT_xxxx constant
82: *
83: * @return mixed
84: */
85: public function tpl_refid($format = '')
86: {
87: return $this->getVar('tpl_refid', $format);
88: }
89:
90: /**
91: * tpl_tplset
92: *
93: * @param string $format Dtype::FORMAT_xxxx constant
94: *
95: * @return mixed
96: */
97: public function tpl_tplset($format = '')
98: {
99: return $this->getVar('tpl_tplset', $format);
100: }
101:
102: /**
103: * tpl_file
104: *
105: * @param string $format Dtype::FORMAT_xxxx constant
106: *
107: * @return mixed
108: */
109: public function tpl_file($format = '')
110: {
111: return $this->getVar('tpl_file', $format);
112: }
113:
114: /**
115: * tpl_desc
116: *
117: * @param string $format Dtype::FORMAT_xxxx constant
118: *
119: * @return mixed
120: */
121: public function tpl_desc($format = '')
122: {
123: return $this->getVar('tpl_desc', $format);
124: }
125:
126: /**
127: * tpl_lastmodified
128: *
129: * @param string $format Dtype::FORMAT_xxxx constant
130: *
131: * @return mixed
132: */
133: public function tpl_lastmodified($format = '')
134: {
135: return $this->getVar('tpl_lastmodified', $format);
136: }
137:
138: /**
139: * tpl_lastimported
140: *
141: * @param string $format Dtype::FORMAT_xxxx constant
142: *
143: * @return mixed
144: */
145: public function tpl_lastimported($format = '')
146: {
147: return $this->getVar('tpl_lastimported', $format);
148: }
149:
150: /**
151: * tpl_module
152: *
153: * @param string $format Dtype::FORMAT_xxxx constant
154: *
155: * @return mixed
156: */
157: public function tpl_module($format = '')
158: {
159: return $this->getVar('tpl_module', $format);
160: }
161:
162: /**
163: * tpl_type
164: *
165: * @param string $format Dtype::FORMAT_xxxx constant
166: *
167: * @return mixed
168: */
169: public function tpl_type($format = '')
170: {
171: return $this->getVar('tpl_type', $format);
172: }
173:
174: /**
175: * tpl_source
176: *
177: * @param string $format Dtype::FORMAT_xxxx constant
178: *
179: * @return mixed
180: */
181: public function tpl_source($format = '')
182: {
183: return $this->getVar('tpl_source', $format);
184: }
185:
186:
187: /**
188: * getSource
189: *
190: * @return string
191: */
192: public function getSource()
193: {
194: return $this->getVar('tpl_source');
195: }
196:
197: /**
198: * getLastModified
199: *
200: * @return int
201: */
202: public function getLastModified()
203: {
204: return $this->getVar('tpl_lastmodified');
205: }
206: }
207: