Files
thetool/application/Patching/Patching.php
2021-09-23 21:14:42 +02:00

29 lines
569 B
PHP

<?php
class Patching extends mfBaseModel {
private $termination;
private $patcher;
public function getProperty($name) {
if($this->$name == null) {
if($name == "patcher") {
$this->patcher = new User($this->patched_by);
return $this->patcher;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = new $classname($this->$idfield);
if($this->$name->id) {
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}