31 lines
770 B
PHP
31 lines
770 B
PHP
<?php
|
|
|
|
class Billing extends mfBaseModel {
|
|
protected $forcestr = ["product_name","product_info","matchcode"];
|
|
|
|
|
|
|
|
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;
|
|
}
|
|
} |