| 1: | <?php |
| 2: | |
| 3: | namespace Scopus\Response; |
| 4: | |
| 5: | class AbstractItem |
| 6: | { |
| 7: | /** @var array */ |
| 8: | protected $data; |
| 9: | |
| 10: | /** @var Bibrecord */ |
| 11: | protected $bibrecord; |
| 12: | |
| 13: | public function __construct(array $data) |
| 14: | { |
| 15: | $this->data = $data; |
| 16: | } |
| 17: | |
| 18: | public function getBibrecord() |
| 19: | { |
| 20: | return $this->bibrecord ?: $this->bibrecord = new Bibrecord($this->data['bibrecord']); |
| 21: | } |
| 22: | } |