public static function factory(Storage $storage, $row) { $jurperson = new JurPerson($storage); $jurperson->setJurPersonID($row["jurpersonid"]); $jurperson->setLabel($row["label"]); return $jurperson; }
public function searchJurPerson($firma) { $sql = "SELECT `jurpersonid`, `label` FROM `jurperson` WHERE `label` = '" . $this->escape($firma) . "'"; $result = $this->getResult($sql, array($this, "parseJurPerson")); if ($result->getCount() > 0) { return $result->fetchRow(); } $jurperson = new JurPerson($this); $jurperson->setLabel($firma); $jurperson->save(); return $jurperson; }