Example #1
0
 /**
  * Constructor
  *
  * @param Array $newattributes Any new attributes that may be passed to the constructor
  */
 function __construct($newattributes = array())
 {
     $attributes = array("id" => "", "effectivedate" => date('m/d/Y H:i:s'), "name" => "", "type" => "", "category" => "", "subcategory" => "", "employeetype" => array(), "employeetypename" => "", "description" => "", "amount" => "", "active" => "Yes", "createdby" => "", "datecreated" => date('m/d/Y H:i:s'), "lastupdatedby" => "", "lastupdatedon" => "", "expirydate" => NULL, "noofemployees" => "0", "noofmonths" => "0", "employeetypeforcomputation" => "", "employeegross" => "0");
     # load the attributes by calling the parent constructor. This is to prevent changing
     # attributes at run time
     parent::__construct(array_merge($attributes, $newattributes));
     $this->setTable("activity");
     $this->setDateFields(array("effectivedate", "datecreated", "lastupdatedon", "expirydate"));
     $this->setIgnoreFields(array("id", "employeetype", "employeetypename", "noofemployees", "noofmonths", "employeetypeforcomputation", "employeegross"));
     $this->setSlowChanging(true);
     $this->setUseViewForPopulate(true);
 }
Example #2
0
 public function Kategorie()
 {
     parent::__construct("kategorie", "kategorieid");
 }