2 if (!defined('GNUSOCIAL')) { exit(1); }
4 class GS_DataObject extends DB_DataObject
6 public function _autoloadClass($class, $table=false)
8 // avoid those annoying PEAR::DB strict standards warnings it causes
9 $old = error_reporting();
10 error_reporting(error_reporting() & ~E_STRICT);
12 $res = parent::_autoloadClass($class, $table);
15 error_reporting($old);
19 // wraps the _connect call so we don't throw E_STRICT warnings during it
20 public function _connect()
22 // avoid those annoying PEAR::DB strict standards warnings it causes
23 $old = error_reporting();
24 error_reporting(error_reporting() & ~E_STRICT);
26 $res = parent::_connect();
29 error_reporting($old);
33 // wraps the _loadConfig call so we don't throw E_STRICT warnings during it
34 // doesn't actually return anything, but we'll follow the same model as the rest of the wrappers
35 public function _loadConfig()
37 // avoid those annoying PEAR::DB strict standards warnings it causes
38 $old = error_reporting();
39 error_reporting(error_reporting() & ~E_STRICT);
41 $res = parent::_loadConfig();
44 error_reporting($old);
48 // wraps the count call so we don't throw E_STRICT warnings during it
49 public function count($countWhat = false,$whereAddOnly = false)
51 // avoid those annoying PEAR::DB strict standards warnings it causes
52 $old = error_reporting();
53 error_reporting(error_reporting() & ~E_STRICT);
55 $res = parent::count($countWhat, $whereAddOnly);
58 error_reporting($old);
62 static public function debugLevel($v = null)
64 // avoid those annoying PEAR::DB strict standards warnings it causes
65 $old = error_reporting();
66 error_reporting(error_reporting() & ~E_STRICT);
68 $res = parent::debugLevel($v);
71 error_reporting($old);
75 static public function factory($table = '')
77 // avoid those annoying PEAR::DB strict standards warnings it causes
78 $old = error_reporting();
79 error_reporting(error_reporting() & ~E_STRICT);
81 $res = parent::factory($table);
84 error_reporting($old);
88 public function get($k = null, $v = null)
90 // avoid those annoying PEAR::DB strict standards warnings it causes
91 $old = error_reporting();
92 error_reporting(error_reporting() & ~E_STRICT);
94 $res = parent::get($k, $v);
97 error_reporting($old);
101 public function fetch()
103 // avoid those annoying PEAR::DB strict standards warnings it causes
104 $old = error_reporting();
105 error_reporting(error_reporting() & ~E_STRICT);
107 $res = parent::fetch();
110 error_reporting($old);
114 public function find($n = false)
116 // avoid those annoying PEAR::DB strict standards warnings it causes
117 $old = error_reporting();
118 error_reporting(error_reporting() & ~E_STRICT);
120 $res = parent::find($n);
123 error_reporting($old);
127 public function fetchRow($row = null)
129 // avoid those annoying PEAR::DB strict standards warnings it causes
130 $old = error_reporting();
131 error_reporting(error_reporting() & ~E_STRICT);
133 $res = parent::fetchRow($row);
136 error_reporting($old);
140 public function links()
142 // avoid those annoying PEAR::DB strict standards warnings it causes
143 $old = error_reporting();
144 error_reporting(error_reporting() & ~E_STRICT);
146 $res = parent::links();
149 error_reporting($old);
153 // wraps the update call so we don't throw E_STRICT warnings during it
154 public function update($dataObject = false)
156 // avoid those annoying PEAR::DB strict standards warnings it causes
157 $old = error_reporting();
158 error_reporting(error_reporting() & ~E_STRICT);
160 $res = parent::update($dataObject);
163 error_reporting($old);
167 static public function staticGet($class, $k, $v = null)
169 // avoid those annoying PEAR::DB strict standards warnings it causes
170 $old = error_reporting();
171 error_reporting(error_reporting() & ~E_STRICT);
173 $res = parent::staticGet($class, $k, $v);
176 error_reporting($old);
180 public function staticGetAutoloadTable($table)
182 // avoid those annoying PEAR::DB strict standards warnings it causes
183 $old = error_reporting();
184 error_reporting(error_reporting() & ~E_STRICT);
186 $res = parent::staticGetAutoloadTable($table);
189 error_reporting($old);