XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
commentstatus.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
16
18{
19 public function __construct()
20 {
21 static $initVars;
22 if (isset($initVars)) {
23 $this->mVars = $initVars;
24 return;
25 }
26 $this->initVar('id', XOBJ_DTYPE_INT, '', true);
27 $this->initVar('name', XOBJ_DTYPE_STRING, '', true, 191);
28 $initVars=$this->mVars;
29 }
30}
31
33{
34 public $_mResults = [];
35
36 public function __construct(&$db)
37 {
38 $root =& XCube_Root::getSingleton();
39 $language = $root->mContext->getXoopsConfig('language');
40 $root->mLanguageManager->loadPageTypeMessageCatalog('comment');
41
42 $this->_mResults[XOOPS_COMMENT_PENDING] =& $this->create();
43 $this->_mResults[XOOPS_COMMENT_PENDING]->setVar('id', XOOPS_COMMENT_PENDING);
44 $this->_mResults[XOOPS_COMMENT_PENDING]->setVar('name', _CM_PENDING);
45
46 $this->_mResults[XOOPS_COMMENT_ACTIVE] =& $this->create();
47 $this->_mResults[XOOPS_COMMENT_ACTIVE]->setVar('id', XOOPS_COMMENT_ACTIVE);
48 $this->_mResults[XOOPS_COMMENT_ACTIVE]->setVar('name', _CM_ACTIVE);
49
50 $this->_mResults[XOOPS_COMMENT_HIDDEN] =& $this->create();
51 $this->_mResults[XOOPS_COMMENT_HIDDEN]->setVar('id', XOOPS_COMMENT_HIDDEN);
52 $this->_mResults[XOOPS_COMMENT_HIDDEN]->setVar('name', _CM_HIDDEN);
53 }
54
55 public function &create()
56 {
57 $ret =new LegacyCommentstatusObject();
58 return $ret;
59 }
60
61 public function &get($id)
62 {
63 if (isset($this->_mResults[$id])) {
64 return $this->_mResults[$id];
65 }
66
67 $ret = null;
68 return $ret;
69 }
70
71 public function &getObjects($criteria = null, $id_as_key = false)
72 {
73 if ($id_as_key) {
74 return $this->_mResults;
75 } else {
76 $ret = [];
77
78 foreach (array_keys($this->_mResults) as $key) {
79 $ret[] =& $this->_mResults[$key];
80 }
81
82 return $ret;
83 }
84 }
85
86 public function insert(&$obj)
87 {
88 return false;
89 }
90
91 public function delete(&$obj)
92 {
93 return false;
94 }
95}