XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
columnside.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
16
17class LegacyColumnsideObject extends XoopsSimpleObject
18{
19 public function LegacyColumnsideObject()
20 {
21 self::__construct();
22 }
23
24 public function __construct()
25 {
26 static $initVars;
27 if (isset($initVars)) {
28 $this->mVars = $initVars;
29 return;
30 }
31 $this->initVar('id', XOBJ_DTYPE_INT, '', true);
32 $this->initVar('name', XOBJ_DTYPE_STRING, '', true, 191);
33 $initVars=$this->mVars;
34 }
35}
36
37class LegacyColumnsideHandler extends XoopsObjectHandler
38{
39 public $_mResults = [];
40
41 public function LegacyColumnsideHandler(&$db)
42 {
44 }
45
46 public function __construct(&$db)
47 {
48 $t_arr = [
49 0 => _AD_LEGACY_LANG_SIDE_BLOCK_LEFT,
50 1 => _AD_LEGACY_LANG_SIDE_BLOCK_RIGHT,
51 3 => _AD_LEGACY_LANG_CENTER_BLOCK_LEFT,
52 4 => _AD_LEGACY_LANG_CENTER_BLOCK_RIGHT,
53 5 => _AD_LEGACY_LANG_CENTER_BLOCK_CENTER
54 ];
55
56 foreach ($t_arr as $id => $name) {
57 $this->_mResults[$id] =& $this->create();
58 $this->_mResults[$id]->setVar('id', $id);
59 $this->_mResults[$id]->setVar('name', $name);
60 }
61 }
62
63 public function &create()
64 {
65 $ret =new LegacyColumnsideObject();
66 return $ret;
67 }
68
69 public function &get($id)
70 {
71 if (isset($this->_mResults[$id])) {
72 return $this->_mResults[$id];
73 }
74
75 $ret = null;
76 return $ret;
77 }
78
79 public function &getObjects($criteria = null, $id_as_key = false)
80 {
81 if ($id_as_key) {
82 return $this->_mResults;
83 } else {
84 $ret = [];
85
86 foreach (array_keys($this->_mResults) as $key) {
87 $ret[] =& $this->_mResults[$key];
88 }
89
90 return $ret;
91 }
92 }
93
94 public function insert(&$obj)
95 {
96 return false;
97 }
98
99 public function delete(&$obj)
100 {
101 return false;
102 }
103}