29 lines
569 B
PHP
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;
|
|
}
|
|
} |