| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | public function __construct($id, $dbData, $tableName, $index) |
||
| 7 | { |
||
| 8 | if($dbData === null) |
||
| 9 | { |
||
| 10 | $dataTable = DataSetFactory::getDataTableByNames('fvs', $tableName); |
||
| 11 | $filter = new \Data\Filter($index.' eq '.$id); |
||
| 12 | $objs = $dataTable->read($filter); |
||
| 13 | if(empty($objs)) |
||
| 14 | { |
||
| 15 | throw new Exception('Unable to locate object with ID '.$id); |
||
| 16 | } |
||
| 17 | $dbData = $objs[0]; |
||
| 18 | } |
||
| 19 | $this->dbData = $dbData; |
||
| 20 | } |
||
| 21 | } |
||
| 22 |