/** * get single Burgstaat instance from a DOMElement * * @param DOMElement $node * @return Burgstaat */ public static function fromDOMElement(DOMElement $node) { $o = new Burgstaat(); $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES)); $o->notifyPristine(); return $o; }
/** * Fetch Burgstaat which references this Patient. Will return null in case reference is invalid. * `patient`.`burgstand_id` -> `burgstaat`.`id` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return Burgstaat */ public function fetchBurgstaat(PDO $db, $sort = null) { $filter = array(Burgstaat::FIELD_ID => $this->getBurgstandId()); $result = Burgstaat::findByFilter($db, $filter, true, $sort); return empty($result) ? null : $result[0]; }