Files
thetool/application/Billing/Billing.php
2024-06-25 12:19:35 +02:00

32 lines
793 B
PHP

<?php
class Billing extends mfBaseModel {
protected $forcestr = ["product_name","product_info","matchcode"];
private $contract;
public function getProperty($name) {
if($this->$name == null) {
$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;
}
}