Added Network

This commit is contained in:
Frank Schubert
2021-06-24 22:34:45 +02:00
parent 1c6acca834
commit 5241cfd175
12 changed files with 475 additions and 15 deletions

View File

@@ -0,0 +1,31 @@
<?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;
}
}