| @@ 196-207 (lines=12) @@ | ||
| 193 | * |
|
| 194 | * @return INC21QueryRow |
|
| 195 | */ |
|
| 196 | public function importFromDatabase(array $data): INC21QueryRow { |
|
| 197 | $this->setId($this->getInt('id', $data)); |
|
| 198 | $this->setItemId($this->get('item_id', $data)); |
|
| 199 | $this->setCircleId($this->get('circle_id', $data)); |
|
| 200 | $this->setInstance($this->get('instance', $data)); |
|
| 201 | ||
| 202 | if ($this->getInstance() === '') { |
|
| 203 | $this->setInstance($this->get('_params.local', $data)); |
|
| 204 | } |
|
| 205 | ||
| 206 | return $this; |
|
| 207 | } |
|
| 208 | ||
| 209 | ||
| 210 | /** |
|
| @@ 422-431 (lines=10) @@ | ||
| 419 | * |
|
| 420 | * @return self |
|
| 421 | */ |
|
| 422 | public function importFromDatabase(array $data): INC21QueryRow { |
|
| 423 | $this->setDbId($this->getInt('id', $data)); |
|
| 424 | $this->import($this->getArray('item', $data)); |
|
| 425 | $this->setOrigData($this->getArray('item', $data)); |
|
| 426 | $this->setType($this->get('type', $data)); |
|
| 427 | $this->setInstance($this->get('instance', $data)); |
|
| 428 | $this->setId($this->get('href', $data)); |
|
| 429 | ||
| 430 | return $this; |
|
| 431 | } |
|
| 432 | ||
| 433 | } |
|
| 434 | ||