Files
thetool/application/PreordernotificationLog/PreordernotificationLog.php
2025-08-22 17:49:54 +02:00

34 lines
1.0 KiB
PHP

<?php
class PreordernotificationLog extends mfBaseModel {
private $notification;
public function getProperty($name) {
if($this->$name == null) {
if($name == "notification") {
$notification = new Preordernotification($this->preordernotification_id);
if($notification->id) {
$this->notification = $notification;
}
return $this->notification;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield);
if(!$this->$name) {
$this->$name = new $classname($this->$idfield);
}
if($this->$name->id) {
mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name);
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}