$name == null) { if($name == "isp") { $isp = mfValuecache::singleton()->getMfObject("Address", $this->isp_id); if(!$isp) { return null; } $this->isp = $isp; return $this->isp; } $classname = ucfirst($name); $idfield = $name."_id"; $this->$name = mfValuecache::singleton()->getMfObject($classname, $this->$idfield); if(!$this->$name) { return null; } } return $this->$name; } }