예제 #1
0
function parseBeitragFormular($session, &$beitrag = null)
{
    $label = $session->getVariable("label");
    $hoehe = $session->getDoubleVariable("hoehe");
    $mailtemplateid = $session->getIntVariable("mailtemplateid");
    if ($beitrag == null) {
        $beitrag = new Beitrag($session->getStorage());
    }
    $beitrag->setLabel($label);
    $beitrag->setHoehe($hoehe);
    $beitrag->setMailTemplateID($mailtemplateid);
    $beitrag->save();
}
 public function getBeitrag($timestamp = null)
 {
     if ($timestamp == null) {
         $timestamp = time();
     }
     $beitrag = $this->getStorage()->searchBeitrag(strftime($this->getFormat(), $timestamp));
     if ($beitrag == null) {
         $beitrag = new Beitrag($this->getStorage());
         $beitrag->setLabel(strftime($this->getFormat(), $timestamp));
         $beitrag->setHoehe(null);
         $beitrag->save();
     }
     return $beitrag;
 }
예제 #3
0
 public static function factory(Storage $storage, $row)
 {
     $beitrag = new Beitrag($storage);
     $beitrag->setBeitragID($row["beitragid"]);
     $beitrag->setLabel($row["label"]);
     $beitrag->setHoehe($row["hoehe"]);
     $beitrag->setMailTemplateID($row["mailtemplateid"]);
     return $beitrag;
 }