| 1: | <?php |
| 2: | |
| 3: | namespace Scopus\Response; |
| 4: | |
| 5: | class AuthorCoredata |
| 6: | { |
| 7: | |
| 8: | protected $data; |
| 9: | |
| 10: | public function __construct(array $data) |
| 11: | { |
| 12: | $this->data = $data; |
| 13: | } |
| 14: | |
| 15: | public function getUrl() |
| 16: | { |
| 17: | return $this->data['prism:url']; |
| 18: | } |
| 19: | |
| 20: | public function getIdentifier() |
| 21: | { |
| 22: | return isset($this->data['dc:identifier']) ? $this->data['dc:identifier'] : null; |
| 23: | } |
| 24: | |
| 25: | public function getAuthorID() |
| 26: | { |
| 27: | $identifier = $this->getIdentifier(); |
| 28: | if (substr($identifier, 0, 10) === 'AUTHOR_ID:') { |
| 29: | return explode(':', $identifier, 2)[1]; |
| 30: | } |
| 31: | } |
| 32: | |
| 33: | public function getEID() |
| 34: | { |
| 35: | return isset($this->data['eid']) ? $this->data['eid'] : null; |
| 36: | } |
| 37: | |
| 38: | public function getDocumentCount() |
| 39: | { |
| 40: | return isset($this->data['document-count']) ? $this->data['document-count'] : null; |
| 41: | } |
| 42: | |
| 43: | public function getCitedByCount() |
| 44: | { |
| 45: | return isset($this->data['cited-by-count']) ? $this->data['cited-by-count'] : null; |
| 46: | } |
| 47: | |
| 48: | public function getCitationCount() |
| 49: | { |
| 50: | return isset($this->data['citation-count']) ? $this->data['citation-count'] : null; |
| 51: | } |
| 52: | } |
| 53: | |