Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class queryqueryset_querygroupqueryset extends queryqueryset_querygroupqueryset_ext

Hide Inherited MembersForm Builder
Description
No description.
 
Constants
constantTABLENAME ["qi_queryqueryset_querygroupqueryset"][ queryqueryset_querygroupqueryset ]
 
Properties
protected_cdate[ queryqueryset_querygroupqueryset_db ]
protected_cdate_dirty[ queryqueryset_querygroupqueryset_db ]
protected_deleted[ queryqueryset_querygroupqueryset_db ]
protected_deleted_dirty[ queryqueryset_querygroupqueryset_db ]
protected_dirty[ obj ]
protected_id[ queryqueryset_querygroupqueryset_db ]
protected_id_dirty[ queryqueryset_querygroupqueryset_db ]
protected_mdate[ queryqueryset_querygroupqueryset_db ]
protected_mdate_dirty[ queryqueryset_querygroupqueryset_db ]
protected_order[ queryqueryset_querygroupqueryset_db ]
protected_order_dirty[ queryqueryset_querygroupqueryset_db ]
protected_primary[ queryqueryset_querygroupqueryset_db ]
protected_primary_dirty[ queryqueryset_querygroupqueryset_db ]
publicproperty_objects_array[ obj ]
protected_query_queryset_id[ queryqueryset_querygroupqueryset_db ]
protected_query_queryset_id_dirty[ queryqueryset_querygroupqueryset_db ]
protected_querygroup_queryset_id[ queryqueryset_querygroupqueryset_db ]
protected_querygroup_queryset_id_dirty[ queryqueryset_querygroupqueryset_db ]
protected_queryqueryset_querygroupqueryset_type_id[ queryqueryset_querygroupqueryset_db ]
protected_queryqueryset_querygroupqueryset_type_id_dirty[ queryqueryset_querygroupqueryset_db ]
 
Methods
publiccommit ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
114  public function commit()
115  {
116      if ($this->_id > 0)
117      {
118          return $this->update();
119      }
120      else
121      {
122          return $this->insert();
123      }
124  }
public__construct ( id , query_queryset_id , querygroup_queryset_id , queryqueryset_querygroupqueryset_type_id [0] )[ queryqueryset_querygroupqueryset_db ]
Parameters
optionalid
optionalquery_queryset_id
optionalquerygroup_queryset_id
optionalqueryqueryset_querygroupqueryset_type_id [0]
Code
048  public function __construct($__id=null, $__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=0)
049  {
050      $this->_id = 0;
051      $this->_query_queryset_id = 0;
052      $this->_querygroup_queryset_id = 0;
053      $this->_queryqueryset_querygroupqueryset_type_id = 0;
054      $this->_primary = false;
055      $this->_order = 0;
056      $this->_mdate = null;
057      $this->_cdate = null;
058      $this->_deleted = false;
059 
060      $this->_id_dirty = false;
061      $this->_query_queryset_id_dirty = false;
062      $this->_querygroup_queryset_id_dirty = false;
063      $this->_queryqueryset_querygroupqueryset_type_id_dirty = false;
064      $this->_primary_dirty = false;
065      $this->_order_dirty = false;
066      $this->_mdate_dirty = false;
067      $this->_cdate_dirty = false;
068      $this->_deleted_dirty = false;
069 
070      if (is_null($__query_queryset_id) && is_null($__querygroup_queryset_id) && is_null($__queryqueryset_querygroupqueryset_type_id) && is_null($__id))
071      {
072          return;
073      }
074 
075      $db = queryqueryset_querygroupqueryset::db();
076      $q  = " SELECT * ";
077      $q .= " FROM qi_queryqueryset_querygroupqueryset ";       
078      if (!is_null($__id))
079      {
080          $q .= " WHERE id = '$__id' ";
081      }
082      else if (!is_null($__query_queryset_id) && !is_null($__querygroup_queryset_id) && !is_null($__queryqueryset_querygroupqueryset_type_id))
083      {
084          $this->query_queryset_id = $__query_queryset_id;
085          $this->querygroup_queryset_id = $__querygroup_queryset_id;
086          $this->queryqueryset_querygroupqueryset_type_id = $__queryqueryset_querygroupqueryset_type_id;
087          $q .= " WHERE query_queryset_id = '$__query_queryset_id' AND querygroup_queryset_id = '$__querygroup_queryset_id' AND queryqueryset_querygroupqueryset_type_id = '$__queryqueryset_querygroupqueryset_type_id' ";
088      }
089 
090      $db->query($q);
091      if ($db->next_record() && $db->num_rows() == 1)
092      {
093          $this->_id = $db->f("id");
094          $this->_query_queryset_id = $db->f("query_queryset_id");
095          $this->_querygroup_queryset_id = $db->f("querygroup_queryset_id");
096          $this->_queryqueryset_querygroupqueryset_type_id = $db->f("queryqueryset_querygroupqueryset_type_id");
097          $this->_primary = $db->f("primary");
098          $this->_order = $db->f("order");
099          $this->_mdate = $db->f("mdate");
100          $this->_cdate = $db->f("cdate");
101          $this->_deleted = $db->f("deleted");
102      }
103  }
protected staticdb ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
355  protected static function db()
356  {
357      return new db();
358  }
publicdelete ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
169  public function delete()
170  {
171      $db = queryqueryset_querygroupqueryset::db();
172      $q  = " UPDATE qi_queryqueryset_querygroupqueryset SET ";
173      $q .= " deleted = 1 ";
174      $q .= " WHERE id = '" . $this->_id . "'";
175      $db->query($q);
176      return true;
177  }
public staticdelete_all ( query_queryset_id , querygroup_queryset_id , queryqueryset_querygroupqueryset_type_id )[ queryqueryset_querygroupqueryset_db ]
Parameters
optionalquery_queryset_id
optionalquerygroup_queryset_id
optionalqueryqueryset_querygroupqueryset_type_id
Code
276  public static function delete_all($__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null)
277  {
278      $db = queryqueryset_querygroupqueryset::db();
279      $q  = " UPDATE qi_queryqueryset_querygroupqueryset SET ";
280      $q .= " deleted = 1 ";
281 
282      $filters = array();
283      if (!is_null($__query_queryset_id))
284      {
285          $filters[] = " query_queryset_id = '$__query_queryset_id' ";
286      }
287      if (!is_null($__querygroup_queryset_id))
288      {
289          $filters[] = " querygroup_queryset_id = '$__querygroup_queryset_id' ";
290      }
291      if (!is_null($__queryqueryset_querygroupqueryset_type_id))
292      {
293          $filters[] = " queryqueryset_querygroupqueryset_type_id = '$__queryqueryset_querygroupqueryset_type_id' ";
294      }
295 
296      $q .= count($filters)>0 ? " WHERE " . implode(" AND ",$filters) . " AND deleted = 0 " : " WHERE deleted=0 ";
297 
298      $db->query($q);
299      return true;
300  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_classname ( )[ obj ]
Parameters
No parameters for this method
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
public staticget_columns ( columns , query_queryset_id , querygroup_queryset_id , queryqueryset_querygroupqueryset_type_id , order , limit , offset [0] )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredcolumns
optionalquery_queryset_id
optionalquerygroup_queryset_id
optionalqueryqueryset_querygroupqueryset_type_id
optionalorder
optionallimit
optionaloffset [0]
Code
188  public static function get_columns($__columns, $__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
189  {
190      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
191      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
192 
193      $db = queryqueryset_querygroupqueryset::db();
194      $data = array();
195      $q  = " SELECT $colstring ";
196      $q .= " FROM qi_queryqueryset_querygroupqueryset ";
197 
198      $filters = array();
199      if (!is_null($__query_queryset_id))
200      {
201          $filters[] = " query_queryset_id = '$__query_queryset_id' ";
202      }
203      if (!is_null($__querygroup_queryset_id))
204      {
205          $filters[] = " querygroup_queryset_id = '$__querygroup_queryset_id' ";
206      }
207      if (!is_null($__queryqueryset_querygroupqueryset_type_id))
208      {
209          $filters[] = " queryqueryset_querygroupqueryset_type_id = '$__queryqueryset_querygroupqueryset_type_id' ";
210      }
211 
212      $q .= count($filters)>0 ? " WHERE " . implode(" AND ",$filters) . " AND deleted = 0 " : " WHERE deleted=0 ";
213 
214      if (is_string($__order))
215      {
216          $q .= "ORDER BY " . $__order;
217      }
218      else if (is_array($__order) and count($__order)>0)
219      {
220          $orderings = array();
221          foreach ($__order as $col=>$dir)
222          {
223              $orderings[] = " $col $dir ";
224          }
225          $q .= "ORDER BY " . implode(", ", $orderings);
226      }
227      else if (is_object($__order))
228      {
229          $q .= "";
230      }
231      else
232      {
233          $q .= " ORDER BY " . $db->param_string("order");
234      }
235 
236      if (!is_null($__limit))
237      {
238          $q .= " LIMIT $__offset , $__limit ";
239      }
240 
241      $db->query($q);
242 
243      if (count($colarray)>1 || $colstring=="*")
244      {
245          while ($db->next_record())
246          {
247              $data[] = $db->record;
248          }
249      }
250      else
251      {
252          while ($db->next_record())
253          {
254              $data[] = $db->f(0);
255          }
256      }
257 
258      return $data;
259  }
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
public staticget_ids ( query_queryset_id , querygroup_queryset_id , queryqueryset_querygroupqueryset_type_id , order , limit , offset [0] )[ queryqueryset_querygroupqueryset_db ]
Parameters
optionalquery_queryset_id
optionalquerygroup_queryset_id
optionalqueryqueryset_querygroupqueryset_type_id
optionalorder
optionallimit
optionaloffset [0]
Code
261  public static function get_ids($__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
262  {
263      return queryqueryset_querygroupqueryset::get_columns("id", $__query_queryset_id, $__querygroup_queryset_id, $__queryqueryset_querygroupqueryset_type_id, $__order, $__limit, $__offset);
264  }
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
public staticget_objects ( query_queryset_id , querygroup_queryset_id , queryqueryset_querygroupqueryset_type_id , order , limit , offset [0] )[ queryqueryset_querygroupqueryset_db ]
Parameters
optionalquery_queryset_id
optionalquerygroup_queryset_id
optionalqueryqueryset_querygroupqueryset_type_id
optionalorder
optionallimit
optionaloffset [0]
Code
266  public static function get_objects($__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
267  {
268      $objects = array();
269      foreach (queryqueryset_querygroupqueryset::get_columns("id", $__query_queryset_id, $__querygroup_queryset_id, $__queryqueryset_querygroupqueryset_type_id, $__order, $__limit, $__offset) as $id)
270      {
271          $objects[] = new queryqueryset_querygroupqueryset($id);
272      }
273      return $objects;
274  }
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicget_query_queryset ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
319  public function get_query_queryset()
320  {
321      return new query_queryset($this->query_queryset_id);
322  }
publicget_querygroup_queryset ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
331  public function get_querygroup_queryset()
332  {
333      return new querygroup_queryset($this->querygroup_queryset_id);
334  }
publicget_queryqueryset_querygroupqueryset_type ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
343  public function get_queryqueryset_querygroupqueryset_type()
344  {
345      return new queryqueryset_querygroupqueryset_type($this->queryqueryset_querygroupqueryset_type_id);
346  }
protectedget_string ( )[ obj ]
Parameters
No parameters for this method
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicget_type ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
308  public function get_type()
309  {
310      $type = new queryqueryset_querygroupqueryset_type($this->_queryqueryset_querygroupqueryset_type_id);
311      return $type->name;
312  }
protectedinsert ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
126  protected function insert()
127  {
128      $db = queryqueryset_querygroupqueryset::db();
129      $q  = " INSERT INTO qi_queryqueryset_querygroupqueryset ( ";
130      $q .= $db->param_string("query_queryset_id") . ", ";
131      $q .= $db->param_string("querygroup_queryset_id") . ", ";
132      $q .= $db->param_string("queryqueryset_querygroupqueryset_type_id") . ", ";
133      $q .= $db->param_string("primary") . ", ";
134      $q .= $db->param_string("order") . ", ";
135      $q .= $db->param_string("mdate") . ", ";
136      $q .= $db->param_string("cdate") . ", ";
137      $q .= $db->param_string("deleted");
138      $q .= " ) VALUES ( ";
139      $q .= $db->value_string($this->_query_queryset_id) . ", ";
140      $q .= $db->value_string($this->_querygroup_queryset_id) . ", ";
141      $q .= $db->value_string($this->_queryqueryset_querygroupqueryset_type_id) . ", ";
142      $q .= ($this->_primary ? "'1'" : "'0'") . ", ";
143      $q .= $db->value_string($this->_order) . ", ";
144      $q .= $db->value_string(timestamp()) . ", ";
145      $q .= $db->value_string(timestamp()) . ", ";
146      $q .= $this->deleted ? "'1'" : "'0'";
147      $q .= " ) ";
148      $db->query($q);
149      $this->_id = $db->insert_id;
150      return true;
151  }
publicmap ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
105  public function map()
106  {
107      $this->_primary = array_key_exists("queryqueryset_querygroupqueryset:primary",$_REQUEST) ? reqval("queryqueryset_querygroupqueryset:primary") : $this->_primary;
108      $this->_order = array_key_exists("queryqueryset_querygroupqueryset:order",$_REQUEST) ? reqval("queryqueryset_querygroupqueryset:order") : $this->_order;
109      $this->_mdate = array_key_exists("queryqueryset_querygroupqueryset:mdate",$_REQUEST) ? reqval("queryqueryset_querygroupqueryset:mdate") : $this->_mdate;
110      $this->_cdate = array_key_exists("queryqueryset_querygroupqueryset:cdate",$_REQUEST) ? reqval("queryqueryset_querygroupqueryset:cdate") : $this->_cdate;
111      $this->_deleted = array_key_exists("queryqueryset_querygroupqueryset:deleted",$_REQUEST) ? reqval("queryqueryset_querygroupqueryset:deleted") : $this->_deleted;
112  }
publicpurge ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
179  public function purge()
180  {
181      $db = queryqueryset_querygroupqueryset::db();
182      $q  = " DELETE FROM qi_queryqueryset_querygroupqueryset ";
183      $q .= " WHERE id = '" . $this->_id . "'";
184      $db->query($q);
185      return true;
186  }
public__set ( p , v )[ obj ]
Parameters
requiredp
requiredv
Code
030  public function __set($p,$v)
031  {
032      $methods = get_class_methods($this);
033      $properties = get_object_vars($this);
034      if (in_array("set_$p",$methods))
035      {
036          $this->{"set_$p"}($v);
037      }
038      else if (array_key_exists("_$p",$properties))
039      {
040          if (!preg_match('/_dirty$/',$p) && property_exists($this,"_{$p}_dirty"))
041          {
042              if (is_object($this->{"_$p"}))
043              {
044                  $this->{"_$p"}->dirty = true;
045              }
046              else
047              {
048                  $this->{"_{$p}_dirty"} = $this->{$p}==$v ? false : true;
049              }
050          }
051          $this->{"_$p"} = $v;
052      }
053      else if (in_array("set_" . substr($p,strpos($p,"_")+1), $methods))
054      {
055          $this->{"set_" . substr($p,strpos($p,"_")+1)}($v,substr($p,0,strpos($p,"_")));
056      }
057      else
058      {
059          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
060      }
061  }
publicset_query_queryset ( v )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredv
Code
323  public function set_query_queryset($v)
324  {
325      if ($v->id > 0)
326      {
327          $this->query_queryset_id = $v->id;
328      }
329  }
publicset_querygroup_queryset ( v )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredv
Code
335  public function set_querygroup_queryset($v)
336  {
337      if ($v->id > 0)
338      {
339          $this->querygroup_queryset_id = $v->id;
340      }
341  }
publicset_queryqueryset_querygroupqueryset_type ( v )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredv
Code
347  public function set_queryqueryset_querygroupqueryset_type($v)
348  {
349      if ($v->id > 0)
350      {
351          $this->queryqueryset_querygroupqueryset_type_id = $v->id;
352      }
353  }
publicset_type ( v )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredv
Code
313  public function set_type($v)
314  {
315      $type = new queryqueryset_querygroupqueryset_type(null, $v);
316      $this->queryqueryset_querygroupqueryset_type_id = $type->id;
317  }
public statictype_id ( type_name )[ queryqueryset_querygroupqueryset_db ]
Parameters
requiredtype_name
Code
302  public static function type_id($__type_name)
303  {
304      $type = new queryqueryset_querygroupqueryset_type(null, $__type_name);
305      return $type->id;
306  }
protectedupdate ( )[ queryqueryset_querygroupqueryset_db ]
Parameters
No parameters for this method
Code
153  protected function update()
154  {
155      $db = queryqueryset_querygroupqueryset::db();
156      $q  = " UPDATE qi_queryqueryset_querygroupqueryset SET ";
157      $q .= $db->param_string("query_queryset_id") . " = " . $db->value_string($this->_query_queryset_id) . ", ";
158      $q .= $db->param_string("querygroup_queryset_id") . " = " . $db->value_string($this->_querygroup_queryset_id) . ", ";
159      $q .= $db->param_string("queryqueryset_querygroupqueryset_type_id") . " = " . $db->value_string($this->_queryqueryset_querygroupqueryset_type_id) . ", ";
160      $q .= $db->param_string("primary") . " = " . ($this->_primary ? "'1'" : "'0'") . ", ";
161      $q .= $db->param_string("order") . " = " . $db->value_string($this->_order) . ", ";
162      $q .= $db->param_string("mdate") . " = " . $db->value_string(timestamp()) . ", ";
163      $q .= $db->param_string("deleted") . " = " . ($this->deleted ? "'1'" : "'0'");
164      $q .= " WHERE id = " . $this->_id;
165      $db->query($q);
166      return true;
167  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicclassname[ obj ]
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publiccolumns[ queryqueryset_querygroupqueryset_db ]
Code
188  public static function get_columns($__columns, $__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
189  {
190      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
191      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
192 
193      $db = queryqueryset_querygroupqueryset::db();
194      $data = array();
195      $q  = " SELECT $colstring ";
196      $q .= " FROM qi_queryqueryset_querygroupqueryset ";
197 
198      $filters = array();
199      if (!is_null($__query_queryset_id))
200      {
201          $filters[] = " query_queryset_id = '$__query_queryset_id' ";
202      }
203      if (!is_null($__querygroup_queryset_id))
204      {
205          $filters[] = " querygroup_queryset_id = '$__querygroup_queryset_id' ";
206      }
207      if (!is_null($__queryqueryset_querygroupqueryset_type_id))
208      {
209          $filters[] = " queryqueryset_querygroupqueryset_type_id = '$__queryqueryset_querygroupqueryset_type_id' ";
210      }
211 
212      $q .= count($filters)>0 ? " WHERE " . implode(" AND ",$filters) . " AND deleted = 0 " : " WHERE deleted=0 ";
213 
214      if (is_string($__order))
215      {
216          $q .= "ORDER BY " . $__order;
217      }
218      else if (is_array($__order) and count($__order)>0)
219      {
220          $orderings = array();
221          foreach ($__order as $col=>$dir)
222          {
223              $orderings[] = " $col $dir ";
224          }
225          $q .= "ORDER BY " . implode(", ", $orderings);
226      }
227      else if (is_object($__order))
228      {
229          $q .= "";
230      }
231      else
232      {
233          $q .= " ORDER BY " . $db->param_string("order");
234      }
235 
236      if (!is_null($__limit))
237      {
238          $q .= " LIMIT $__offset , $__limit ";
239      }
240 
241      $db->query($q);
242 
243      if (count($colarray)>1 || $colstring=="*")
244      {
245          while ($db->next_record())
246          {
247              $data[] = $db->record;
248          }
249      }
250      else
251      {
252          while ($db->next_record())
253          {
254              $data[] = $db->f(0);
255          }
256      }
257 
258      return $data;
259  }
publicdirty[ obj ]
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicids[ queryqueryset_querygroupqueryset_db ]
Code
261  public static function get_ids($__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
262  {
263      return queryqueryset_querygroupqueryset::get_columns("id", $__query_queryset_id, $__querygroup_queryset_id, $__queryqueryset_querygroupqueryset_type_id, $__order, $__limit, $__offset);
264  }
publicjson[ obj ]
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicobjects[ queryqueryset_querygroupqueryset_db ]
Code
266  public static function get_objects($__query_queryset_id=null, $__querygroup_queryset_id=null, $__queryqueryset_querygroupqueryset_type_id=null, $__order=null, $__limit=null, $__offset=0)
267  {
268      $objects = array();
269      foreach (queryqueryset_querygroupqueryset::get_columns("id", $__query_queryset_id, $__querygroup_queryset_id, $__queryqueryset_querygroupqueryset_type_id, $__order, $__limit, $__offset) as $id)
270      {
271          $objects[] = new queryqueryset_querygroupqueryset($id);
272      }
273      return $objects;
274  }
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicquery_queryset[ queryqueryset_querygroupqueryset_db ]
Code
319  public function get_query_queryset()
320  {
321      return new query_queryset($this->query_queryset_id);
322  }
Code
323  public function set_query_queryset($v)
324  {
325      if ($v->id > 0)
326      {
327          $this->query_queryset_id = $v->id;
328      }
329  }
publicquerygroup_queryset[ queryqueryset_querygroupqueryset_db ]
Code
331  public function get_querygroup_queryset()
332  {
333      return new querygroup_queryset($this->querygroup_queryset_id);
334  }
Code
335  public function set_querygroup_queryset($v)
336  {
337      if ($v->id > 0)
338      {
339          $this->querygroup_queryset_id = $v->id;
340      }
341  }
publicqueryqueryset_querygroupqueryset_type[ queryqueryset_querygroupqueryset_db ]
Code
343  public function get_queryqueryset_querygroupqueryset_type()
344  {
345      return new queryqueryset_querygroupqueryset_type($this->queryqueryset_querygroupqueryset_type_id);
346  }
Code
347  public function set_queryqueryset_querygroupqueryset_type($v)
348  {
349      if ($v->id > 0)
350      {
351          $this->queryqueryset_querygroupqueryset_type_id = $v->id;
352      }
353  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publictype[ queryqueryset_querygroupqueryset_db ]
Code
308  public function get_type()
309  {
310      $type = new queryqueryset_querygroupqueryset_type($this->_queryqueryset_querygroupqueryset_type_id);
311      return $type->name;
312  }
Code
313  public function set_type($v)
314  {
315      $type = new queryqueryset_querygroupqueryset_type(null, $v);
316      $this->queryqueryset_querygroupqueryset_type_id = $type->id;
317  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads