Files
thetool/application/ProductNetwork/ProductNetwork.php
2021-08-06 16:35:38 +02:00

28 lines
499 B
PHP

<?php
class ProductNetwork extends mfBaseModel {
private $product;
private $network;
public function getProperty($name) {
if($this->$name == null) {
if(!$this->id) {
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;
}
}