Added Networksection
This commit is contained in:
22
application/Networksection/Networksection.php
Normal file
22
application/Networksection/Networksection.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class Networksection extends mfBaseModel {
|
||||
private $network;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user