23 lines
433 B
PHP
23 lines
433 B
PHP
<?php
|
|
|
|
class NetworkAddress extends mfBaseModel {
|
|
private $network;
|
|
private $address;
|
|
|
|
public function getProperty($name) {
|
|
if($this->$name == 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;
|
|
}
|
|
} |