Files
thetool/application/Network/Network.php
Frank Schubert 5241cfd175 Added Network
2021-06-24 22:34:45 +02:00

31 lines
608 B
PHP

<?php
class Network extends mfBaseModel {
private $owner;
public function getProperty($name) {
if($this->$name == null) {
if($name == "owner") {
if($this->id) {
$this->owner = new Address($this->owner_id);
return $this->owner;
} else {
return null;
}
}
$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;
}
}