예제 #1
0
 public static function factory(Storage $storage, $row)
 {
     $konto = new Konto($storage);
     $konto->setKontoID($row["kontoid"]);
     $konto->setInhaber($row["inhaber"]);
     $konto->setIBan($row["iban"]);
     $konto->setBIC($row["bic"]);
     return $konto;
 }
예제 #2
0
 public function searchKonto($inhaber, $iban, $bic)
 {
     $sql = "SELECT `kontoid`, `inhaber`, `iban`, `bic` FROM `konto` WHERE `inhaber` = '" . $this->escape($inhaber) . "' AND `iban` = '" . $this->escape($iban) . "' AND `bic` = '" . $this->escape($bic) . "'";
     $result = $this->getResult($sql, array($this, "parseKonto"));
     if ($result->getCount() > 0) {
         return $result->fetchRow();
     }
     $konto = new Konto($this);
     $konto->setInhaber($inhaber);
     $konto->setIBan($iban);
     $konto->setBIC($bic);
     $konto->save();
     return $konto;
 }