1: <?php
2:
3: namespace Scopus\Response;
4:
5: class CiteInfo extends AbstractCoredata implements IAbstract
6: {
7: /** @var array */
8: protected $data;
9:
10: /** @var Affiliation[] */
11: protected $affiliations;
12:
13: /** @var EntryAuthor[] */
14: protected $authors;
15:
16: //Entry of SEARCH_AUTHOR_URI
17: /** @var AuthorName[] */
18: protected $preferredName;
19:
20: public function __construct(array $data)
21: {
22: parent::__construct($data);
23: }
24:
25: //identifier is in AbstractCoredata
26:
27: //url is in AbstractCoredata
28:
29: //title is in AbstractCoredata
30:
31: /**
32: * @return EntryAuthor[]
33: */
34: public function getAuthors(): array
35: {
36: if (isset($this->data['author'])) {
37: return $this->authors ?? $this->authors = array_map(function ($author) {
38: return new EntryAuthor($author);
39: }, $this->data['author']);
40: }
41:
42: return [];
43: }
44:
45: public function getCitationType()
46: {
47: return isset($this->data["$"]) ? $this->data["$"] : null;
48: }
49:
50: public function getCitationTypeCode()
51: {
52: return isset($this->data["@code"]) ? $this->data["@code"] : null;
53: }
54:
55: public function getSortYear()
56: {
57: return isset($this->data["sort-year"]) ? $this->data["sort-year"] : null;
58: }
59:
60: public function getStartingPage()
61: {
62: return isset($this->data["prism:startingPage"]) ? $this->data["prism:startingPage"] : null;
63: }
64:
65: public function getEndingPage()
66: {
67: return isset($this->data["prism:endingPage"]) ? $this->data["prism:endingPage"] : null;
68: }
69:
70: //getPublicationName is in AbstractCoredata
71:
72: //issn is in AbstractCoredata
73:
74: public function getPreviousColumnCount()
75: {
76: return isset($this->data["pcc"]) ? $this->data["pcc"] : null;
77: }
78:
79: public function getColumnCount()
80: {
81: return isset($this->data["cc"]) ? $this->data["cc"] : null;
82: }
83:
84: public function getLaterColumnCount()
85: {
86: return isset($this->data["lcc"]) ? $this->data["lcc"] : null;
87: }
88:
89: public function getRangeCount()
90: {
91: return isset($this->data["rangeCount"]) ? $this->data["rangeCount"] : null;
92: }
93:
94: public function getRowTotal()
95: {
96: return isset($this->data["rowTotal"]) ? $this->data["rowTotal"] : null;
97: }
98: }
99: