1: <?php
2:
3: if (!defined('XOOPS_ROOT_PATH')) exit();
4:
5: class XoopsSubjecticon extends XoopsObject
6: {
7: function XoopsSubjecticon()
8: {
9: $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 255);
10: }
11: }
12:
13: class XoopsSubjecticonHandler extends XoopsObjectHandler
14: {
15: var $_mResult;
16:
17: function XoopsSubjecticonHandler(&$db)
18: {
19: require_once XOOPS_ROOT_PATH . "/class/xoopslists.php";
20: $this->_mResult =& XoopsLists::getSubjectsList();
21: }
22:
23: function &create()
24: {
25: $ret =new XoopsSubjecticon();
26: return $ret;
27: }
28:
29: function &get($filename)
30: {
31: if (isset($this->_mResult[$filename])) {
32: $obj =new XoopsSubjecticon();
33: $obj->setVar('filename', $this->_mResult[$filename]);
34:
35: return $obj;
36: }
37:
38: $ret = null;
39: return $ret;
40: }
41:
42: function &getObjects($criteria = null, $key_as_id = false)
43: {
44: $ret = array();
45:
46: foreach ($this->_mResult as $filename => $value) {
47: $obj =new XoopsSubjecticon();
48: $obj->setVar('filename', $filename);
49: if ($key_as_id) {
50: $ret[$filename] =& $obj;
51: }
52: else {
53: $ret[] =& $obj;
54: }
55: unset($obj);
56: }
57:
58: return $ret;
59: }
60:
61: function insert(&$obj)
62: {
63: return false;
64: }
65:
66: function delete(&$obj)
67: {
68: return false;
69: }
70: }
71:
72: ?>
73: