Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class taskdate extends taskdate_ext

Hide Inherited MembersProject Management
Description
No description.
 
Constants
constantTABLENAME ["prj_taskdate"][ taskdate ]
 
Properties
protected_cdate[ taskdate_db ]
protected_cdate_dirty[ taskdate_db ]
protected_deleted[ taskdate_db ]
protected_deleted_dirty[ taskdate_db ]
protected_dirty[ obj ]
protected_id[ taskdate_db ]
protected_id_dirty[ taskdate_db ]
protected_mdate[ taskdate_db ]
protected_mdate_dirty[ taskdate_db ]
publicproperty_objects_array[ obj ]
protected_value[ taskdate_db ]
protected_value_dirty[ taskdate_db ]
 
Methods
publiccommit ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
086  public function commit()
087  {
088      if ($this->_id > 0)
089      {
090          $this->update();
091      }
092      else
093      {
094          $this->insert();
095      }
096 
097      foreach ($this->property_objects_array as $property=>$object)
098      {
099          $this->{$property} = $object;
100      }
101 
102      return true;
103  }
public__construct ( id , value )[ taskdate_db ]
Parameters
optionalid
optionalvalue
Code
040  public function __construct($__id=null, $__value=null)
041  {
042      $this->_id = 0;
043      $this->_value = $__value;
044      $this->_mdate = null;
045      $this->_cdate = null;
046      $this->_deleted = false;
047 
048      $this->_id_dirty = false;
049      $this->_value_dirty = false;
050      $this->_mdate_dirty = false;
051      $this->_cdate_dirty = false;
052      $this->_deleted_dirty = false;
053 
054      if (is_null($__id))
055      {
056          return;
057      }
058 
059      $db = taskdate::db();
060      $q  = " SELECT prj_taskdate.id,prj_taskdate.value,prj_taskdate.mdate,prj_taskdate.cdate,prj_taskdate.deleted ";
061      $q .= " FROM prj_taskdate ";       
062      if (!is_null($__id))
063      {
064          $q .= " WHERE id = '$__id' ";
065      }
066 
067      $db->query($q);
068      if ($db->next_record() && $db->num_rows() == 1)
069      {
070          $this->_id = $db->f("id");
071          $this->_value = $db->f("value");
072          $this->_mdate = $db->f("mdate");
073          $this->_cdate = $db->f("cdate");
074          $this->_deleted = $db->f("deleted");
075      }
076  }
protected staticdb ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
404  protected static function db()
405  {
406      return new db();
407  }
publicdelete ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
136  public function delete()
137  {
138      $db = taskdate::db();
139      $q  = " UPDATE prj_taskdate SET ";
140      $q .= " deleted = 1 ";
141      $q .= " WHERE id = " . $this->_id;
142      $db->query($q);
143      $this->deleted = true;
144      return true;
145  }
public staticdelete_all ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
242  public static function delete_all()
243  {
244      $db = taskdate::db();
245      $q  = " UPDATE prj_taskdate SET ";
246      $q .= " deleted = 1 ";
247     
248      $db->query($q);
249      return true;
250  }
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 , order , lookups , where_clause , limit , offset [0] )[ taskdate_db ]
Parameters
requiredcolumns
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
167  public static function get_columns($__columns, $__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
168  {
169      $lookups = is_array($__lookups) ? $__lookups : array($__lookups);
170      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
171      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
172 
173      $db = taskdate::db();
174      $data = array();
175      $q  = " SELECT $colstring ";
176      $q .= " FROM prj_taskdate ";
177      $q .= " WHERE prj_taskdate.deleted = 0 ";
178      $q .= is_null($__where_clause) ? null : " AND ($__where_clause) ";
179 
180      if (is_string($__order))
181      {
182          $q .= "ORDER BY " . $__order;
183      }
184      else if (is_array($__order) and count($__order)>0)
185      {
186          $orderings = array();
187          foreach ($__order as $col=>$dir)
188          {
189              $orderings[] = " $col $dir ";
190          }
191          $q .= "ORDER BY " . implode(", ", $orderings);
192      }
193      else if (is_object($__order))
194      {
195          $q .= "";
196      }
197      else
198      {
199          // THERE IS NO `order` COLUMN ON THIS OBJECT
200      }
201 
202      if (!is_null($__limit))
203      {
204          $q .= " LIMIT $__offset , $__limit ";
205      }
206 
207      $db->query($q);
208 
209      if (count($colarray)>1 || $colstring=="*")
210      {
211          while ($db->next_record())
212          {
213              $data[] = $db->record;
214          }
215      }
216      else
217      {
218          while ($db->next_record())
219          {
220              $data[] = $db->f(0);
221          }
222      }
223 
224      return $data;
225  }
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 ( order , lookups , where_clause , limit , offset [0] )[ taskdate_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
227  public static function get_ids($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
228  {
229      return taskdate::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset);
230  }
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 ( order , lookups , where_clause , limit , offset [0] )[ taskdate_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
232  public static function get_objects($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
233  {
234      $objects = array();
235      foreach (taskdate::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset) as $id)
236      {
237          $objects[] = new taskdate($id);
238      }
239      return $objects;
240  }
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
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_task ( type ["default"] )[ taskdate_db ]
Parameters
optionaltype ["default"]
Code
305  public function get_task($__type="default")
306  {
307      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
308      $this->property_objects_array["{$__type}_task"] = $object;
309      return $object;
310  }
publicget_task_id ( type ["default"] )[ taskdate_db ]
Parameters
optionaltype ["default"]
Code
311  public function get_task_id($__type="default")
312  {
313      $ids = $this->get_task_ids($__type, true);
314      return (count($ids)==1 ? $ids[0] : null);
315  }
publicget_task_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ taskdate_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
316  public function get_task_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
317  {
318      $task_ids = array();
319      $db = taskdate::db();
320      $q  = " SELECT prj_task.id FROM prj_task_taskdate INNER JOIN prj_task ON prj_task_taskdate.task_id=prj_task.id AND prj_task_taskdate.deleted=0 AND prj_task.deleted=0 AND prj_task_taskdate.taskdate_id='$this->id' " . (is_null($__type) ? "" : " AND prj_task_taskdate.task_taskdate_type_id='" . task_taskdate::type_id($__type) . "'") . ($__get_primary ? " AND prj_task_taskdate.primary=1 " : "");
321      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
322      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
323      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
324      $db->query($q);
325      while ($db->next_record())
326      {
327          $task_ids[] = $db->f("id");
328      }
329      return $task_ids;
330  }
publicget_task_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ taskdate_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
331  public function get_task_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
332  {
333      $ids = $this->get_task_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
334      $objects = array();
335      foreach ($ids as $index=>$id)
336      {
337          $objects[$index] = new task($id);
338      }
339      return $objects;
340  }
protectedinsert ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
105  protected function insert()
106  {
107      $db = taskdate::db();
108      $q  = " INSERT INTO prj_taskdate ( ";
109      $q .= $db->param_string("value") . ", ";
110      $q .= $db->param_string("mdate") . ", ";
111      $q .= $db->param_string("cdate") . ", ";
112      $q .= $db->param_string("deleted");
113      $q .= " ) VALUES ( ";
114      $q .= $db->value_string($this->_value) . ", ";
115      $q .= $db->value_string(timestamp()) . ", ";
116      $q .= $db->value_string(timestamp()) . ", ";
117      $q .= $this->deleted ? "'1'" : "'0'";
118      $q .= " ) ";
119      $db->query($q);
120      $this->_id = $db->insert_id;
121      return true;
122  }
publicmap ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
078  public function map()
079  {
080      $this->_value = array_key_exists("taskdate:value",$_REQUEST) ? reqval("taskdate:value") : $this->_value;
081      $this->_mdate = array_key_exists("taskdate:mdate",$_REQUEST) ? reqval("taskdate:mdate") : $this->_mdate;
082      $this->_cdate = array_key_exists("taskdate:cdate",$_REQUEST) ? reqval("taskdate:cdate") : $this->_cdate;
083      $this->_deleted = array_key_exists("taskdate:deleted",$_REQUEST) ? reqval("taskdate:deleted") : $this->_deleted;
084  }
publicpurge ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
158  public function purge()
159  {
160      $db = taskdate::db();
161      $q  = " DELETE FROM prj_taskdate ";
162      $q .= " WHERE id = " . $this->_id;
163      $db->query($q);
164      return true;
165  }
public staticsearch ( keyword )[ taskdate_db ]
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_task ( v , type ["default"] )[ taskdate_db ]
Parameters
requiredv
optionaltype ["default"]
Code
342  public function set_task($__v, $__type="default")
343  {
344      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
345      if (is_null($__v))
346      {
347          $rel = new task_taskdate(null,$object->id,$this->id,task_taskdate::type_id($__type));
348          $rel->delete();
349          if (!is_null(keyval($this->property_objects_array,"{$__type}_task")))
350          {
351              $this->property_objects_array["{$__type}_task"] = null;
352          }
353      }
354      else
355      {
356          $id = $object->id;
357          $object = $__v;
358          $object->id = $__v->id>0 ? $__v->id : $id;
359          $object->commit();
360          $this->set_task_ids(array($object->id),$__type);
361      }
362  }
publicset_task_id ( v , type ["default"] )[ taskdate_db ]
Parameters
requiredv
optionaltype ["default"]
Code
363  public function set_task_id($__v, $__type="default")
364  {
365      $this->set_task_ids(array($__v),$__type);
366  }
publicset_task_ids ( v , type ["default"] )[ taskdate_db ]
Parameters
requiredv
optionaltype ["default"]
Code
367  public function set_task_ids($__v, $__type="default")
368  {
369      if ($this->id == 0)
370      {
371          $this->commit();
372      }
373      $type_id = task_taskdate::type_id($__type);
374      task_taskdate::delete_all(null,$this->id,$type_id);
375      if (is_array($__v))
376      {
377          foreach ($__v as $index=>$id)
378          {
379              $object = new task_taskdate(null,$id,$this->id,$type_id);
380              $object->deleted = false;
381              $object->task_taskdate_type_id = $type_id;
382              $object->commit();
383              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_task")))
384              {
385                  $this->property_objects_array["{$__type}_task"] = new task($object->task_id);
386              }
387          }
388          $this->_dirty = true;
389      }
390  }
publicset_task_list ( v , type ["default"] )[ taskdate_db ]
Parameters
requiredv
optionaltype ["default"]
Code
391  public function set_task_list($__v, $__type="default")
392  {
393      if (is_array($__v))
394      {
395          $ids = array();
396          foreach ($__v as $index=>$object)
397          {
398              $ids[] = $object->id;
399          }
400          $this->set_task_ids($ids,$__type);
401      }
402  }
public__toString ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
300  public function __toString()
301  {
302      return (is_null($this->value) ? "" : $this->value);
303  }
publicundelete ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
147  public function undelete()
148  {
149      $db = taskdate::db();
150      $q  = " UPDATE prj_taskdate SET ";
151      $q .= " deleted = 0 ";
152      $q .= " WHERE id = " . $this->_id;
153      $db->query($q);
154      $this->deleted = false;
155      return true;
156  }
protectedupdate ( )[ taskdate_db ]
Parameters
No parameters for this method
Code
124  protected function update()
125  {
126      $db = taskdate::db();
127      $q  = " UPDATE prj_taskdate SET ";
128      $q .= $db->param_string("value") . " = " . $db->value_string($this->_value) . ", ";
129      $q .= $db->param_string("mdate") . " = " . $db->value_string(timestamp()) . ", ";
130      $q .= $db->param_string("deleted") . " = " . ($this->deleted ? "'1'" : "'0'");
131      $q .= " WHERE id = " . $this->_id;
132      $db->query($q);
133      return true;
134  }
 
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[ taskdate_db ]
Code
167  public static function get_columns($__columns, $__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
168  {
169      $lookups = is_array($__lookups) ? $__lookups : array($__lookups);
170      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
171      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
172 
173      $db = taskdate::db();
174      $data = array();
175      $q  = " SELECT $colstring ";
176      $q .= " FROM prj_taskdate ";
177      $q .= " WHERE prj_taskdate.deleted = 0 ";
178      $q .= is_null($__where_clause) ? null : " AND ($__where_clause) ";
179 
180      if (is_string($__order))
181      {
182          $q .= "ORDER BY " . $__order;
183      }
184      else if (is_array($__order) and count($__order)>0)
185      {
186          $orderings = array();
187          foreach ($__order as $col=>$dir)
188          {
189              $orderings[] = " $col $dir ";
190          }
191          $q .= "ORDER BY " . implode(", ", $orderings);
192      }
193      else if (is_object($__order))
194      {
195          $q .= "";
196      }
197      else
198      {
199          // THERE IS NO `order` COLUMN ON THIS OBJECT
200      }
201 
202      if (!is_null($__limit))
203      {
204          $q .= " LIMIT $__offset , $__limit ";
205      }
206 
207      $db->query($q);
208 
209      if (count($colarray)>1 || $colstring=="*")
210      {
211          while ($db->next_record())
212          {
213              $data[] = $db->record;
214          }
215      }
216      else
217      {
218          while ($db->next_record())
219          {
220              $data[] = $db->f(0);
221          }
222      }
223 
224      return $data;
225  }
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[ taskdate_db ]
Code
227  public static function get_ids($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
228  {
229      return taskdate::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset);
230  }
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[ taskdate_db ]
Code
232  public static function get_objects($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
233  {
234      $objects = array();
235      foreach (taskdate::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset) as $id)
236      {
237          $objects[] = new taskdate($id);
238      }
239      return $objects;
240  }
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publictask[ taskdate_db ]
Code
305  public function get_task($__type="default")
306  {
307      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
308      $this->property_objects_array["{$__type}_task"] = $object;
309      return $object;
310  }
Code
342  public function set_task($__v, $__type="default")
343  {
344      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
345      if (is_null($__v))
346      {
347          $rel = new task_taskdate(null,$object->id,$this->id,task_taskdate::type_id($__type));
348          $rel->delete();
349          if (!is_null(keyval($this->property_objects_array,"{$__type}_task")))
350          {
351              $this->property_objects_array["{$__type}_task"] = null;
352          }
353      }
354      else
355      {
356          $id = $object->id;
357          $object = $__v;
358          $object->id = $__v->id>0 ? $__v->id : $id;
359          $object->commit();
360          $this->set_task_ids(array($object->id),$__type);
361      }
362  }
publictask_id[ taskdate_db ]
Code
311  public function get_task_id($__type="default")
312  {
313      $ids = $this->get_task_ids($__type, true);
314      return (count($ids)==1 ? $ids[0] : null);
315  }
Code
363  public function set_task_id($__v, $__type="default")
364  {
365      $this->set_task_ids(array($__v),$__type);
366  }
publictask_ids[ taskdate_db ]
Code
316  public function get_task_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
317  {
318      $task_ids = array();
319      $db = taskdate::db();
320      $q  = " SELECT prj_task.id FROM prj_task_taskdate INNER JOIN prj_task ON prj_task_taskdate.task_id=prj_task.id AND prj_task_taskdate.deleted=0 AND prj_task.deleted=0 AND prj_task_taskdate.taskdate_id='$this->id' " . (is_null($__type) ? "" : " AND prj_task_taskdate.task_taskdate_type_id='" . task_taskdate::type_id($__type) . "'") . ($__get_primary ? " AND prj_task_taskdate.primary=1 " : "");
321      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
322      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
323      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
324      $db->query($q);
325      while ($db->next_record())
326      {
327          $task_ids[] = $db->f("id");
328      }
329      return $task_ids;
330  }
Code
367  public function set_task_ids($__v, $__type="default")
368  {
369      if ($this->id == 0)
370      {
371          $this->commit();
372      }
373      $type_id = task_taskdate::type_id($__type);
374      task_taskdate::delete_all(null,$this->id,$type_id);
375      if (is_array($__v))
376      {
377          foreach ($__v as $index=>$id)
378          {
379              $object = new task_taskdate(null,$id,$this->id,$type_id);
380              $object->deleted = false;
381              $object->task_taskdate_type_id = $type_id;
382              $object->commit();
383              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_task")))
384              {
385                  $this->property_objects_array["{$__type}_task"] = new task($object->task_id);
386              }
387          }
388          $this->_dirty = true;
389      }
390  }
publictask_list[ taskdate_db ]
Code
331  public function get_task_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
332  {
333      $ids = $this->get_task_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
334      $objects = array();
335      foreach ($ids as $index=>$id)
336      {
337          $objects[$index] = new task($id);
338      }
339      return $objects;
340  }
Code
391  public function set_task_list($__v, $__type="default")
392  {
393      if (is_array($__v))
394      {
395          $ids = array();
396          foreach ($__v as $index=>$object)
397          {
398              $ids[] = $object->id;
399          }
400          $this->set_task_ids($ids,$__type);
401      }
402  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads