Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class budget extends budget_ext

Hide Inherited MembersFinance and Accounting
Description
No description.
 
Constants
constantTABLENAME ["fa_budget"][ budget ]
 
Properties
protected_budget_type_id[ budget_db ]
protected_budget_type_id_dirty[ budget_db ]
protected_cdate[ budget_db ]
protected_cdate_dirty[ budget_db ]
protected_deleted[ budget_db ]
protected_deleted_dirty[ budget_db ]
protected_description[ budget_db ]
protected_description_dirty[ budget_db ]
protected_dirty[ obj ]
protected_id[ budget_db ]
protected_id_dirty[ budget_db ]
protected_mdate[ budget_db ]
protected_mdate_dirty[ budget_db ]
protected_name[ budget_db ]
protected_name_dirty[ budget_db ]
publicproperty_objects_array[ obj ]
 
Methods
publiccommit ( )[ budget_db ]
Parameters
No parameters for this method
Code
098  public function commit()
099  {
100      if ($this->_id > 0)
101      {
102          $this->update();
103      }
104      else
105      {
106          $this->insert();
107      }
108 
109      foreach ($this->property_objects_array as $property=>$object)
110      {
111          $this->{$property} = $object;
112      }
113 
114      return true;
115  }
public__construct ( id )[ budget_db ]
Parameters
optionalid
Code
044  public function __construct($__id=null)
045  {
046      $this->_id = 0;
047      $this->_name = "";
048      $this->_description = "";
049      $this->_budget_type_id = 0;
050      $this->_mdate = null;
051      $this->_cdate = null;
052      $this->_deleted = false;
053 
054      $this->_id_dirty = false;
055      $this->_name_dirty = false;
056      $this->_description_dirty = false;
057      $this->_budget_type_id_dirty = false;
058      $this->_mdate_dirty = false;
059      $this->_cdate_dirty = false;
060      $this->_deleted_dirty = false;
061 
062      if (is_null($__id))
063      {
064          return;
065      }
066 
067      $db = budget::db();
068      $q  = " SELECT fa_budget.id,fa_budget.name,fa_budget.description,fa_budget.budget_type_id,fa_budget.mdate,fa_budget.cdate,fa_budget.deleted ";
069      $q .= " FROM fa_budget ";       
070      if (!is_null($__id))
071      {
072          $q .= " WHERE id = '$__id' ";
073      }
074 
075      $db->query($q);
076      if ($db->next_record() && $db->num_rows() == 1)
077      {
078          $this->_id = $db->f("id");
079          $this->_name = $db->f("name");
080          $this->_description = $db->f("description");
081          $this->_budget_type_id = $db->f("budget_type_id");
082          $this->_mdate = $db->f("mdate");
083          $this->_cdate = $db->f("cdate");
084          $this->_deleted = $db->f("deleted");
085      }
086  }
protected staticdb ( )[ budget_db ]
Parameters
No parameters for this method
Code
650  protected static function db()
651  {
652      return new db();
653  }
publicdelete ( )[ budget_db ]
Parameters
No parameters for this method
Code
154  public function delete()
155  {
156      $db = budget::db();
157      $q  = " UPDATE fa_budget SET ";
158      $q .= " deleted = 1 ";
159      $q .= " WHERE id = " . $this->_id;
160      $db->query($q);
161      $this->deleted = true;
162      return true;
163  }
public staticdelete_all ( )[ budget_db ]
Parameters
No parameters for this method
Code
261  public static function delete_all()
262  {
263      $db = budget::db();
264      $q  = " UPDATE fa_budget SET ";
265      $q .= " deleted = 1 ";
266     
267      $db->query($q);
268      return true;
269  }
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_budget_type ( )[ budget_db ]
Parameters
No parameters for this method
Code
341  public function get_budget_type()
342  {
343      return new budget_type($this->budget_type_id);
344  }
publicget_budgetvalue ( type ["default"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
353  public function get_budgetvalue($__type="default")
354  {
355      $object = is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")) ? new budgetvalue($this->get_budgetvalue_id($__type)) : $this->property_objects_array["{$__type}_budgetvalue"];
356      $this->property_objects_array["{$__type}_budgetvalue"] = $object;
357      return $object;
358  }
publicget_budgetvalue_id ( type ["default"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
359  public function get_budgetvalue_id($__type="default")
360  {
361      $ids = $this->get_budgetvalue_ids($__type, true);
362      return (count($ids)==1 ? $ids[0] : null);
363  }
publicget_budgetvalue_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
364  public function get_budgetvalue_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
365  {
366      $budgetvalue_ids = array();
367      $db = budget::db();
368      $q  = " SELECT fa_budgetvalue.id FROM fa_budget_budgetvalue INNER JOIN fa_budgetvalue ON fa_budget_budgetvalue.budgetvalue_id=fa_budgetvalue.id AND fa_budget_budgetvalue.deleted=0 AND fa_budgetvalue.deleted=0 AND fa_budget_budgetvalue.budget_id='$this->id' " . (is_null($__type) ? "" : " AND fa_budget_budgetvalue.budget_budgetvalue_type_id='" . budget_budgetvalue::type_id($__type) . "'") . ($__get_primary ? " AND fa_budget_budgetvalue.primary=1 " : "");
369      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
370      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
371      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
372      $db->query($q);
373      while ($db->next_record())
374      {
375          $budgetvalue_ids[] = $db->f("id");
376      }
377      return $budgetvalue_ids;
378  }
publicget_budgetvalue_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
379  public function get_budgetvalue_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
380  {
381      $ids = $this->get_budgetvalue_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
382      $objects = array();
383      foreach ($ids as $index=>$id)
384      {
385          $objects[$index] = new budgetvalue($id);
386      }
387      return $objects;
388  }
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] )[ budget_db ]
Parameters
requiredcolumns
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
185  public static function get_columns($__columns, $__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
186  {
187      $lookups = is_array($__lookups) ? $__lookups : array($__lookups);
188      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
189      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
190 
191      $db = budget::db();
192      $data = array();
193      $q  = " SELECT $colstring ";
194      $q .= " FROM fa_budget ";
195      $q .= " WHERE fa_budget.deleted = 0 ";
196      $q .= is_null($__where_clause) ? null : " AND ($__where_clause) ";
197      $q .= array_key_exists("budget_type_id",$lookups) ? " AND fa_budget.budget_type_id='" . $lookups["budget_type_id"] . "' " : "";
198 
199      if (is_string($__order))
200      {
201          $q .= "ORDER BY " . $__order;
202      }
203      else if (is_array($__order) and count($__order)>0)
204      {
205          $orderings = array();
206          foreach ($__order as $col=>$dir)
207          {
208              $orderings[] = " $col $dir ";
209          }
210          $q .= "ORDER BY " . implode(", ", $orderings);
211      }
212      else if (is_object($__order))
213      {
214          $q .= "";
215      }
216      else
217      {
218          // THERE IS NO `order` COLUMN ON THIS OBJECT
219      }
220 
221      if (!is_null($__limit))
222      {
223          $q .= " LIMIT $__offset , $__limit ";
224      }
225 
226      $db->query($q);
227 
228      if (count($colarray)>1 || $colstring=="*")
229      {
230          while ($db->next_record())
231          {
232              $data[] = $db->record;
233          }
234      }
235      else
236      {
237          while ($db->next_record())
238          {
239              $data[] = $db->f(0);
240          }
241      }
242 
243      return $data;
244  }
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] )[ budget_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
246  public static function get_ids($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
247  {
248      return budget::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset);
249  }
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] )[ budget_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
251  public static function get_objects($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
252  {
253      $objects = array();
254      foreach (budget::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset) as $id)
255      {
256          $objects[] = new budget($id);
257      }
258      return $objects;
259  }
publicget_projectentity ( type ["default"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
551  public function get_projectentity($__type="default")
552  {
553      $object = is_null(keyval($this->property_objects_array,"{$__type}_projectentity")) ? new projectentity($this->get_projectentity_id($__type)) : $this->property_objects_array["{$__type}_projectentity"];
554      $this->property_objects_array["{$__type}_projectentity"] = $object;
555      return $object;
556  }
publicget_projectentity_id ( type ["default"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
557  public function get_projectentity_id($__type="default")
558  {
559      $ids = $this->get_projectentity_ids($__type, true);
560      return (count($ids)==1 ? $ids[0] : null);
561  }
publicget_projectentity_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
562  public function get_projectentity_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
563  {
564      $projectentity_ids = array();
565      $db = budget::db();
566      $q  = " SELECT prj_projectentity.id FROM prj_budget_projectentity INNER JOIN prj_projectentity ON prj_budget_projectentity.projectentity_id=prj_projectentity.id AND prj_budget_projectentity.deleted=0 AND prj_projectentity.deleted=0 AND prj_budget_projectentity.budget_id='$this->id' " . (is_null($__type) ? "" : " AND prj_budget_projectentity.budget_projectentity_type_id='" . budget_projectentity::type_id($__type) . "'") . ($__get_primary ? " AND prj_budget_projectentity.primary=1 " : "");
567      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
568      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
569      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
570      $db->query($q);
571      while ($db->next_record())
572      {
573          $projectentity_ids[] = $db->f("id");
574      }
575      return $projectentity_ids;
576  }
publicget_projectentity_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
577  public function get_projectentity_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
578  {
579      $ids = $this->get_projectentity_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
580      $objects = array();
581      foreach ($ids as $index=>$id)
582      {
583          $objects[$index] = new projectentity($id);
584      }
585      return $objects;
586  }
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"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
452  public function get_task($__type="default")
453  {
454      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
455      $this->property_objects_array["{$__type}_task"] = $object;
456      return $object;
457  }
publicget_task_id ( type ["default"] )[ budget_db ]
Parameters
optionaltype ["default"]
Code
458  public function get_task_id($__type="default")
459  {
460      $ids = $this->get_task_ids($__type, true);
461      return (count($ids)==1 ? $ids[0] : null);
462  }
publicget_task_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
463  public function get_task_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
464  {
465      $task_ids = array();
466      $db = budget::db();
467      $q  = " SELECT prj_task.id FROM prj_budget_task INNER JOIN prj_task ON prj_budget_task.task_id=prj_task.id AND prj_budget_task.deleted=0 AND prj_task.deleted=0 AND prj_budget_task.budget_id='$this->id' " . (is_null($__type) ? "" : " AND prj_budget_task.budget_task_type_id='" . budget_task::type_id($__type) . "'") . ($__get_primary ? " AND prj_budget_task.primary=1 " : "");
468      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
469      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
470      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
471      $db->query($q);
472      while ($db->next_record())
473      {
474          $task_ids[] = $db->f("id");
475      }
476      return $task_ids;
477  }
publicget_task_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ budget_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
478  public function get_task_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
479  {
480      $ids = $this->get_task_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
481      $objects = array();
482      foreach ($ids as $index=>$id)
483      {
484          $objects[$index] = new task($id);
485      }
486      return $objects;
487  }
publicget_type ( )[ budget_db ]
Parameters
No parameters for this method
Code
330  public function get_type()
331  {
332      $type = new budget_type($this->_budget_type_id);
333      return $type->name;
334  }
protectedinsert ( )[ budget_db ]
Parameters
No parameters for this method
Code
117  protected function insert()
118  {
119      $db = budget::db();
120      $q  = " INSERT INTO fa_budget ( ";
121      $q .= $db->param_string("name") . ", ";
122      $q .= $db->param_string("description") . ", ";
123      $q .= $db->param_string("budget_type_id") . ", ";
124      $q .= $db->param_string("mdate") . ", ";
125      $q .= $db->param_string("cdate") . ", ";
126      $q .= $db->param_string("deleted");
127      $q .= " ) VALUES ( ";
128      $q .= $db->value_string($this->_name) . ", ";
129      $q .= $db->value_string($this->_description) . ", ";
130      $q .= $db->value_string($this->_budget_type_id) . ", ";
131      $q .= $db->value_string(timestamp()) . ", ";
132      $q .= $db->value_string(timestamp()) . ", ";
133      $q .= $this->deleted ? "'1'" : "'0'";
134      $q .= " ) ";
135      $db->query($q);
136      $this->_id = $db->insert_id;
137      return true;
138  }
publicmap ( )[ budget_db ]
Parameters
No parameters for this method
Code
088  public function map()
089  {
090      $this->_name = array_key_exists("budget:name",$_REQUEST) ? reqval("budget:name") : $this->_name;
091      $this->_description = array_key_exists("budget:description",$_REQUEST) ? reqval("budget:description") : $this->_description;
092      $this->_budget_type_id = array_key_exists("budget:budget_type_id",$_REQUEST) ? reqval("budget:budget_type_id") : $this->_budget_type_id;
093      $this->_mdate = array_key_exists("budget:mdate",$_REQUEST) ? reqval("budget:mdate") : $this->_mdate;
094      $this->_cdate = array_key_exists("budget:cdate",$_REQUEST) ? reqval("budget:cdate") : $this->_cdate;
095      $this->_deleted = array_key_exists("budget:deleted",$_REQUEST) ? reqval("budget:deleted") : $this->_deleted;
096  }
publicpurge ( )[ budget_db ]
Parameters
No parameters for this method
Code
176  public function purge()
177  {
178      $db = budget::db();
179      $q  = " DELETE FROM fa_budget ";
180      $q .= " WHERE id = " . $this->_id;
181      $db->query($q);
182      return true;
183  }
public staticsearch ( keyword )[ budget_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_budget_type ( v )[ budget_db ]
Parameters
requiredv
Code
345  public function set_budget_type($v)
346  {
347      if ($v->id > 0)
348      {
349          $this->budget_type_id = $v->id;
350      }
351  }
publicset_budgetvalue ( v , type ["default"] )[ budget_ext ]
Parameters
requiredv
optionaltype ["default"]
Code
008  public function set_budgetvalue($__v, $__type="default")
009  {
010      $object = is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")) ? new budgetvalue($this->get_budgetvalue_id($__type)) : $this->property_objects_array["{$__type}_budgetvalue"];
011      if (is_null($__v))
012      {
013          $rel = new budget_budgetvalue(null,$this->id,$object->id,budget_budgetvalue::type_id($__type));
014          $rel->delete();
015          $object->delete();
016          if (!is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")))
017          {
018              $this->property_objects_array["{$__type}_budgetvalue"] = null;
019          }
020      }
021      else
022      {
023          /*$id = $object->id;
024          $object = $__v;
025          $object->id = $__v->id>0 ? $__v->id : $id;
026          */
027          $object->value = is_object($__v) ? $__v->value : $__v;
028          $object->commit();
029          $this->set_budgetvalue_ids(array($object->id),$__type);
030      }
031  }
publicset_budgetvalue_id ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
411  public function set_budgetvalue_id($__v, $__type="default")
412  {
413      $this->set_budgetvalue_ids(array($__v),$__type);
414  }
publicset_budgetvalue_ids ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
415  public function set_budgetvalue_ids($__v, $__type="default")
416  {
417      if ($this->id == 0)
418      {
419          $this->commit();
420      }
421      $type_id = budget_budgetvalue::type_id($__type);
422      budget_budgetvalue::delete_all($this->id,null,$type_id);
423      if (is_array($__v))
424      {
425          foreach ($__v as $index=>$id)
426          {
427              $object = new budget_budgetvalue(null,$this->id,$id,$type_id);
428              $object->deleted = false;
429              $object->budget_budgetvalue_type_id = $type_id;
430              $object->commit();
431              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")))
432              {
433                  $this->property_objects_array["{$__type}_budgetvalue"] = new budgetvalue($object->budgetvalue_id);
434              }
435          }
436          $this->_dirty = true;
437      }
438  }
publicset_budgetvalue_list ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
439  public function set_budgetvalue_list($__v, $__type="default")
440  {
441      if (is_array($__v))
442      {
443          $ids = array();
444          foreach ($__v as $index=>$object)
445          {
446              $ids[] = $object->id;
447          }
448          $this->set_budgetvalue_ids($ids,$__type);
449      }
450  }
publicset_projectentity ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
588  public function set_projectentity($__v, $__type="default")
589  {
590      $object = is_null(keyval($this->property_objects_array,"{$__type}_projectentity")) ? new projectentity($this->get_projectentity_id($__type)) : $this->property_objects_array["{$__type}_projectentity"];
591      if (is_null($__v))
592      {
593          $rel = new budget_projectentity(null,$this->id,$object->id,budget_projectentity::type_id($__type));
594          $rel->delete();
595          if (!is_null(keyval($this->property_objects_array,"{$__type}_projectentity")))
596          {
597              $this->property_objects_array["{$__type}_projectentity"] = null;
598          }
599      }
600      else
601      {
602          $id = $object->id;
603          $object = $__v;
604          $object->id = $__v->id>0 ? $__v->id : $id;
605          $object->commit();
606          $this->set_projectentity_ids(array($object->id),$__type);
607      }
608  }
publicset_projectentity_id ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
609  public function set_projectentity_id($__v, $__type="default")
610  {
611      $this->set_projectentity_ids(array($__v),$__type);
612  }
publicset_projectentity_ids ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
613  public function set_projectentity_ids($__v, $__type="default")
614  {
615      if ($this->id == 0)
616      {
617          $this->commit();
618      }
619      $type_id = budget_projectentity::type_id($__type);
620      budget_projectentity::delete_all($this->id,null,$type_id);
621      if (is_array($__v))
622      {
623          foreach ($__v as $index=>$id)
624          {
625              $object = new budget_projectentity(null,$this->id,$id,$type_id);
626              $object->deleted = false;
627              $object->budget_projectentity_type_id = $type_id;
628              $object->commit();
629              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_projectentity")))
630              {
631                  $this->property_objects_array["{$__type}_projectentity"] = new projectentity($object->projectentity_id);
632              }
633          }
634          $this->_dirty = true;
635      }
636  }
publicset_projectentity_list ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
637  public function set_projectentity_list($__v, $__type="default")
638  {
639      if (is_array($__v))
640      {
641          $ids = array();
642          foreach ($__v as $index=>$object)
643          {
644              $ids[] = $object->id;
645          }
646          $this->set_projectentity_ids($ids,$__type);
647      }
648  }
publicset_task ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
489  public function set_task($__v, $__type="default")
490  {
491      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
492      if (is_null($__v))
493      {
494          $rel = new budget_task(null,$this->id,$object->id,budget_task::type_id($__type));
495          $rel->delete();
496          if (!is_null(keyval($this->property_objects_array,"{$__type}_task")))
497          {
498              $this->property_objects_array["{$__type}_task"] = null;
499          }
500      }
501      else
502      {
503          $id = $object->id;
504          $object = $__v;
505          $object->id = $__v->id>0 ? $__v->id : $id;
506          $object->commit();
507          $this->set_task_ids(array($object->id),$__type);
508      }
509  }
publicset_task_id ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
510  public function set_task_id($__v, $__type="default")
511  {
512      $this->set_task_ids(array($__v),$__type);
513  }
publicset_task_ids ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
514  public function set_task_ids($__v, $__type="default")
515  {
516      if ($this->id == 0)
517      {
518          $this->commit();
519      }
520      $type_id = budget_task::type_id($__type);
521      budget_task::delete_all($this->id,null,$type_id);
522      if (is_array($__v))
523      {
524          foreach ($__v as $index=>$id)
525          {
526              $object = new budget_task(null,$this->id,$id,$type_id);
527              $object->deleted = false;
528              $object->budget_task_type_id = $type_id;
529              $object->commit();
530              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_task")))
531              {
532                  $this->property_objects_array["{$__type}_task"] = new task($object->task_id);
533              }
534          }
535          $this->_dirty = true;
536      }
537  }
publicset_task_list ( v , type ["default"] )[ budget_db ]
Parameters
requiredv
optionaltype ["default"]
Code
538  public function set_task_list($__v, $__type="default")
539  {
540      if (is_array($__v))
541      {
542          $ids = array();
543          foreach ($__v as $index=>$object)
544          {
545              $ids[] = $object->id;
546          }
547          $this->set_task_ids($ids,$__type);
548      }
549  }
publicset_type ( v )[ budget_db ]
Parameters
requiredv
Code
335  public function set_type($v)
336  {
337      $type = new budget_type(null, $v);
338      $this->budget_type_id = $type->id;
339  }
public__toString ( )[ budget_db ]
Parameters
No parameters for this method
Code
319  public function __toString()
320  {
321      return (is_null($this->name) ? "" : $this->name);
322  }
public statictype_id ( type_name )[ budget_db ]
Parameters
requiredtype_name
Code
324  public static function type_id($__type_name)
325  {
326      $type = new budget_type(null, $__type_name);
327      return $type->id;
328  }
publicundelete ( )[ budget_db ]
Parameters
No parameters for this method
Code
165  public function undelete()
166  {
167      $db = budget::db();
168      $q  = " UPDATE fa_budget SET ";
169      $q .= " deleted = 0 ";
170      $q .= " WHERE id = " . $this->_id;
171      $db->query($q);
172      $this->deleted = false;
173      return true;
174  }
protectedupdate ( )[ budget_db ]
Parameters
No parameters for this method
Code
140  protected function update()
141  {
142      $db = budget::db();
143      $q  = " UPDATE fa_budget SET ";
144      $q .= $db->param_string("name") . " = " . $db->value_string($this->_name) . ", ";
145      $q .= $db->param_string("description") . " = " . $db->value_string($this->_description) . ", ";
146      $q .= $db->param_string("budget_type_id") . " = " . $db->value_string($this->_budget_type_id) . ", ";
147      $q .= $db->param_string("mdate") . " = " . $db->value_string(timestamp()) . ", ";
148      $q .= $db->param_string("deleted") . " = " . ($this->deleted ? "'1'" : "'0'");
149      $q .= " WHERE id = " . $this->_id;
150      $db->query($q);
151      return true;
152  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicbudget_type[ budget_db ]
Code
341  public function get_budget_type()
342  {
343      return new budget_type($this->budget_type_id);
344  }
Code
345  public function set_budget_type($v)
346  {
347      if ($v->id > 0)
348      {
349          $this->budget_type_id = $v->id;
350      }
351  }
publicbudgetvalue[ budget_db ]
[ budget_ext ]
Code
353  public function get_budgetvalue($__type="default")
354  {
355      $object = is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")) ? new budgetvalue($this->get_budgetvalue_id($__type)) : $this->property_objects_array["{$__type}_budgetvalue"];
356      $this->property_objects_array["{$__type}_budgetvalue"] = $object;
357      return $object;
358  }
Code
008  public function set_budgetvalue($__v, $__type="default")
009  {
010      $object = is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")) ? new budgetvalue($this->get_budgetvalue_id($__type)) : $this->property_objects_array["{$__type}_budgetvalue"];
011      if (is_null($__v))
012      {
013          $rel = new budget_budgetvalue(null,$this->id,$object->id,budget_budgetvalue::type_id($__type));
014          $rel->delete();
015          $object->delete();
016          if (!is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")))
017          {
018              $this->property_objects_array["{$__type}_budgetvalue"] = null;
019          }
020      }
021      else
022      {
023          /*$id = $object->id;
024          $object = $__v;
025          $object->id = $__v->id>0 ? $__v->id : $id;
026          */
027          $object->value = is_object($__v) ? $__v->value : $__v;
028          $object->commit();
029          $this->set_budgetvalue_ids(array($object->id),$__type);
030      }
031  }
publicbudgetvalue_id[ budget_db ]
Code
359  public function get_budgetvalue_id($__type="default")
360  {
361      $ids = $this->get_budgetvalue_ids($__type, true);
362      return (count($ids)==1 ? $ids[0] : null);
363  }
Code
411  public function set_budgetvalue_id($__v, $__type="default")
412  {
413      $this->set_budgetvalue_ids(array($__v),$__type);
414  }
publicbudgetvalue_ids[ budget_db ]
Code
364  public function get_budgetvalue_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
365  {
366      $budgetvalue_ids = array();
367      $db = budget::db();
368      $q  = " SELECT fa_budgetvalue.id FROM fa_budget_budgetvalue INNER JOIN fa_budgetvalue ON fa_budget_budgetvalue.budgetvalue_id=fa_budgetvalue.id AND fa_budget_budgetvalue.deleted=0 AND fa_budgetvalue.deleted=0 AND fa_budget_budgetvalue.budget_id='$this->id' " . (is_null($__type) ? "" : " AND fa_budget_budgetvalue.budget_budgetvalue_type_id='" . budget_budgetvalue::type_id($__type) . "'") . ($__get_primary ? " AND fa_budget_budgetvalue.primary=1 " : "");
369      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
370      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
371      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
372      $db->query($q);
373      while ($db->next_record())
374      {
375          $budgetvalue_ids[] = $db->f("id");
376      }
377      return $budgetvalue_ids;
378  }
Code
415  public function set_budgetvalue_ids($__v, $__type="default")
416  {
417      if ($this->id == 0)
418      {
419          $this->commit();
420      }
421      $type_id = budget_budgetvalue::type_id($__type);
422      budget_budgetvalue::delete_all($this->id,null,$type_id);
423      if (is_array($__v))
424      {
425          foreach ($__v as $index=>$id)
426          {
427              $object = new budget_budgetvalue(null,$this->id,$id,$type_id);
428              $object->deleted = false;
429              $object->budget_budgetvalue_type_id = $type_id;
430              $object->commit();
431              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_budgetvalue")))
432              {
433                  $this->property_objects_array["{$__type}_budgetvalue"] = new budgetvalue($object->budgetvalue_id);
434              }
435          }
436          $this->_dirty = true;
437      }
438  }
publicbudgetvalue_list[ budget_db ]
Code
379  public function get_budgetvalue_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
380  {
381      $ids = $this->get_budgetvalue_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
382      $objects = array();
383      foreach ($ids as $index=>$id)
384      {
385          $objects[$index] = new budgetvalue($id);
386      }
387      return $objects;
388  }
Code
439  public function set_budgetvalue_list($__v, $__type="default")
440  {
441      if (is_array($__v))
442      {
443          $ids = array();
444          foreach ($__v as $index=>$object)
445          {
446              $ids[] = $object->id;
447          }
448          $this->set_budgetvalue_ids($ids,$__type);
449      }
450  }
publicclassname[ obj ]
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publiccolumns[ budget_db ]
Code
185  public static function get_columns($__columns, $__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
186  {
187      $lookups = is_array($__lookups) ? $__lookups : array($__lookups);
188      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
189      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
190 
191      $db = budget::db();
192      $data = array();
193      $q  = " SELECT $colstring ";
194      $q .= " FROM fa_budget ";
195      $q .= " WHERE fa_budget.deleted = 0 ";
196      $q .= is_null($__where_clause) ? null : " AND ($__where_clause) ";
197      $q .= array_key_exists("budget_type_id",$lookups) ? " AND fa_budget.budget_type_id='" . $lookups["budget_type_id"] . "' " : "";
198 
199      if (is_string($__order))
200      {
201          $q .= "ORDER BY " . $__order;
202      }
203      else if (is_array($__order) and count($__order)>0)
204      {
205          $orderings = array();
206          foreach ($__order as $col=>$dir)
207          {
208              $orderings[] = " $col $dir ";
209          }
210          $q .= "ORDER BY " . implode(", ", $orderings);
211      }
212      else if (is_object($__order))
213      {
214          $q .= "";
215      }
216      else
217      {
218          // THERE IS NO `order` COLUMN ON THIS OBJECT
219      }
220 
221      if (!is_null($__limit))
222      {
223          $q .= " LIMIT $__offset , $__limit ";
224      }
225 
226      $db->query($q);
227 
228      if (count($colarray)>1 || $colstring=="*")
229      {
230          while ($db->next_record())
231          {
232              $data[] = $db->record;
233          }
234      }
235      else
236      {
237          while ($db->next_record())
238          {
239              $data[] = $db->f(0);
240          }
241      }
242 
243      return $data;
244  }
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[ budget_db ]
Code
246  public static function get_ids($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
247  {
248      return budget::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset);
249  }
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[ budget_db ]
Code
251  public static function get_objects($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
252  {
253      $objects = array();
254      foreach (budget::get_columns("id", $__order, $__lookups, $__where_clause, $__limit, $__offset) as $id)
255      {
256          $objects[] = new budget($id);
257      }
258      return $objects;
259  }
publicprojectentity[ budget_db ]
Code
551  public function get_projectentity($__type="default")
552  {
553      $object = is_null(keyval($this->property_objects_array,"{$__type}_projectentity")) ? new projectentity($this->get_projectentity_id($__type)) : $this->property_objects_array["{$__type}_projectentity"];
554      $this->property_objects_array["{$__type}_projectentity"] = $object;
555      return $object;
556  }
Code
588  public function set_projectentity($__v, $__type="default")
589  {
590      $object = is_null(keyval($this->property_objects_array,"{$__type}_projectentity")) ? new projectentity($this->get_projectentity_id($__type)) : $this->property_objects_array["{$__type}_projectentity"];
591      if (is_null($__v))
592      {
593          $rel = new budget_projectentity(null,$this->id,$object->id,budget_projectentity::type_id($__type));
594          $rel->delete();
595          if (!is_null(keyval($this->property_objects_array,"{$__type}_projectentity")))
596          {
597              $this->property_objects_array["{$__type}_projectentity"] = null;
598          }
599      }
600      else
601      {
602          $id = $object->id;
603          $object = $__v;
604          $object->id = $__v->id>0 ? $__v->id : $id;
605          $object->commit();
606          $this->set_projectentity_ids(array($object->id),$__type);
607      }
608  }
publicprojectentity_id[ budget_db ]
Code
557  public function get_projectentity_id($__type="default")
558  {
559      $ids = $this->get_projectentity_ids($__type, true);
560      return (count($ids)==1 ? $ids[0] : null);
561  }
Code
609  public function set_projectentity_id($__v, $__type="default")
610  {
611      $this->set_projectentity_ids(array($__v),$__type);
612  }
publicprojectentity_ids[ budget_db ]
Code
562  public function get_projectentity_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
563  {
564      $projectentity_ids = array();
565      $db = budget::db();
566      $q  = " SELECT prj_projectentity.id FROM prj_budget_projectentity INNER JOIN prj_projectentity ON prj_budget_projectentity.projectentity_id=prj_projectentity.id AND prj_budget_projectentity.deleted=0 AND prj_projectentity.deleted=0 AND prj_budget_projectentity.budget_id='$this->id' " . (is_null($__type) ? "" : " AND prj_budget_projectentity.budget_projectentity_type_id='" . budget_projectentity::type_id($__type) . "'") . ($__get_primary ? " AND prj_budget_projectentity.primary=1 " : "");
567      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
568      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
569      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
570      $db->query($q);
571      while ($db->next_record())
572      {
573          $projectentity_ids[] = $db->f("id");
574      }
575      return $projectentity_ids;
576  }
Code
613  public function set_projectentity_ids($__v, $__type="default")
614  {
615      if ($this->id == 0)
616      {
617          $this->commit();
618      }
619      $type_id = budget_projectentity::type_id($__type);
620      budget_projectentity::delete_all($this->id,null,$type_id);
621      if (is_array($__v))
622      {
623          foreach ($__v as $index=>$id)
624          {
625              $object = new budget_projectentity(null,$this->id,$id,$type_id);
626              $object->deleted = false;
627              $object->budget_projectentity_type_id = $type_id;
628              $object->commit();
629              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_projectentity")))
630              {
631                  $this->property_objects_array["{$__type}_projectentity"] = new projectentity($object->projectentity_id);
632              }
633          }
634          $this->_dirty = true;
635      }
636  }
publicprojectentity_list[ budget_db ]
Code
577  public function get_projectentity_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
578  {
579      $ids = $this->get_projectentity_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
580      $objects = array();
581      foreach ($ids as $index=>$id)
582      {
583          $objects[$index] = new projectentity($id);
584      }
585      return $objects;
586  }
Code
637  public function set_projectentity_list($__v, $__type="default")
638  {
639      if (is_array($__v))
640      {
641          $ids = array();
642          foreach ($__v as $index=>$object)
643          {
644              $ids[] = $object->id;
645          }
646          $this->set_projectentity_ids($ids,$__type);
647      }
648  }
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[ budget_db ]
Code
452  public function get_task($__type="default")
453  {
454      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
455      $this->property_objects_array["{$__type}_task"] = $object;
456      return $object;
457  }
Code
489  public function set_task($__v, $__type="default")
490  {
491      $object = is_null(keyval($this->property_objects_array,"{$__type}_task")) ? new task($this->get_task_id($__type)) : $this->property_objects_array["{$__type}_task"];
492      if (is_null($__v))
493      {
494          $rel = new budget_task(null,$this->id,$object->id,budget_task::type_id($__type));
495          $rel->delete();
496          if (!is_null(keyval($this->property_objects_array,"{$__type}_task")))
497          {
498              $this->property_objects_array["{$__type}_task"] = null;
499          }
500      }
501      else
502      {
503          $id = $object->id;
504          $object = $__v;
505          $object->id = $__v->id>0 ? $__v->id : $id;
506          $object->commit();
507          $this->set_task_ids(array($object->id),$__type);
508      }
509  }
publictask_id[ budget_db ]
Code
458  public function get_task_id($__type="default")
459  {
460      $ids = $this->get_task_ids($__type, true);
461      return (count($ids)==1 ? $ids[0] : null);
462  }
Code
510  public function set_task_id($__v, $__type="default")
511  {
512      $this->set_task_ids(array($__v),$__type);
513  }
publictask_ids[ budget_db ]
Code
463  public function get_task_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
464  {
465      $task_ids = array();
466      $db = budget::db();
467      $q  = " SELECT prj_task.id FROM prj_budget_task INNER JOIN prj_task ON prj_budget_task.task_id=prj_task.id AND prj_budget_task.deleted=0 AND prj_task.deleted=0 AND prj_budget_task.budget_id='$this->id' " . (is_null($__type) ? "" : " AND prj_budget_task.budget_task_type_id='" . budget_task::type_id($__type) . "'") . ($__get_primary ? " AND prj_budget_task.primary=1 " : "");
468      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
469      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
470      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
471      $db->query($q);
472      while ($db->next_record())
473      {
474          $task_ids[] = $db->f("id");
475      }
476      return $task_ids;
477  }
Code
514  public function set_task_ids($__v, $__type="default")
515  {
516      if ($this->id == 0)
517      {
518          $this->commit();
519      }
520      $type_id = budget_task::type_id($__type);
521      budget_task::delete_all($this->id,null,$type_id);
522      if (is_array($__v))
523      {
524          foreach ($__v as $index=>$id)
525          {
526              $object = new budget_task(null,$this->id,$id,$type_id);
527              $object->deleted = false;
528              $object->budget_task_type_id = $type_id;
529              $object->commit();
530              if (count($__v)==1 && !is_null(keyval($this->property_objects_array,"{$__type}_task")))
531              {
532                  $this->property_objects_array["{$__type}_task"] = new task($object->task_id);
533              }
534          }
535          $this->_dirty = true;
536      }
537  }
publictask_list[ budget_db ]
Code
478  public function get_task_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
479  {
480      $ids = $this->get_task_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
481      $objects = array();
482      foreach ($ids as $index=>$id)
483      {
484          $objects[$index] = new task($id);
485      }
486      return $objects;
487  }
Code
538  public function set_task_list($__v, $__type="default")
539  {
540      if (is_array($__v))
541      {
542          $ids = array();
543          foreach ($__v as $index=>$object)
544          {
545              $ids[] = $object->id;
546          }
547          $this->set_task_ids($ids,$__type);
548      }
549  }
publictype[ budget_db ]
Code
330  public function get_type()
331  {
332      $type = new budget_type($this->_budget_type_id);
333      return $type->name;
334  }
Code
335  public function set_type($v)
336  {
337      $type = new budget_type(null, $v);
338      $this->budget_type_id = $type->id;
339  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads