public function __construct($id = NULL) { parent::__construct(); $this->setTableDefs($this->table_defs); $this->initialize($id); if ($id != NULL) { $this->needs_loading = TRUE; } }
function __construct($fromDef, $toDef) { parent::__construct(); $parentClass = get_parent_class($this); $from = new $parentClass(); $to = new $parentClass(); if (is_object($fromDef)) { $from->setTableDefs($fromDef->getTableDefs()); } else { $from->setTableDefs($fromDef); } if (is_object($toDef)) { $to->setTableDefs($toDef->getTableDefs()); } else { $to->setTableDefs($toDef); } $this->from = $from; $this->to = $to; $this->setLinkDefs(); }