XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
subjecticon.php
1<?php
11
12
13if (!defined('XOOPS_ROOT_PATH')) {
14 exit();
15}
16
18{
19 public function __construct()
20 {
21 $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 191);
22 }
23}
24
26{
27 public $_mResult;
28
29 public function __construct(&$db)
30 {
31 require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
32 $this->_mResult =& XoopsLists::getSubjectsList();
33 }
34
35 public function &create()
36 {
37 $ret =new XoopsSubjecticon();
38 return $ret;
39 }
40
41 public function &get($filename)
42 {
43 if (isset($this->_mResult[$filename])) {
44 $obj =new XoopsSubjecticon();
45 $obj->setVar('filename', $this->_mResult[$filename]);
46
47 return $obj;
48 }
49
50 $ret = null;
51 return $ret;
52 }
53
54 public function &getObjects($criteria = null, $key_as_id = false)
55 {
56 $ret = [];
57
58 foreach ($this->_mResult as $filename => $value) {
59 $obj =new XoopsSubjecticon();
60 $obj->setVar('filename', $filename);
61 if ($key_as_id) {
62 $ret[$filename] =& $obj;
63 } else {
64 $ret[] =& $obj;
65 }
66 unset($obj);
67 }
68
69 return $ret;
70 }
71
72 public function insert(&$obj)
73 {
74 return false;
75 }
76
77 public function delete(&$obj)
78 {
79 return false;
80 }
81}
initVar($key, $data_type, $value=null, $required=false, $maxlength=null, $options='')
Definition object.php:206