27 lines
539 B
PHP
27 lines
539 B
PHP
<?php
|
|
|
|
class Workflowvalue extends mfBaseModel {
|
|
private $item;
|
|
|
|
public function getProperty($name) {
|
|
if($this->$name == null) {
|
|
|
|
if($name == "item") {
|
|
$this->item = new Workflowitem($this->item_id);
|
|
return $this->item;
|
|
}
|
|
|
|
$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;
|
|
}
|
|
} |