| 1: | <?php |
| 2: | |
| 3: | namespace Scopus\Response; |
| 4: | |
| 5: | class AuthorAffiliation |
| 6: | { |
| 7: | |
| 8: | protected $data; |
| 9: | |
| 10: | |
| 11: | protected $nameVariants; |
| 12: | |
| 13: | public function __construct(array $data) |
| 14: | { |
| 15: | $this->data = $data['ip-doc']; |
| 16: | } |
| 17: | |
| 18: | public function getId() |
| 19: | { |
| 20: | return $this->data['@id']; |
| 21: | } |
| 22: | |
| 23: | public function getType() |
| 24: | { |
| 25: | return isset($this->data['@type']) ? $this->data['@type'] : null; |
| 26: | } |
| 27: | |
| 28: | public function getDomain() |
| 29: | { |
| 30: | return isset($this->data['org-domain']) ? $this->data['org-domain'] : null; |
| 31: | } |
| 32: | |
| 33: | public function getURL() |
| 34: | { |
| 35: | return isset($this->data['org-URL']) ? $this->data['org-URL'] : null; |
| 36: | } |
| 37: | |
| 38: | public function getDispName() |
| 39: | { |
| 40: | return isset($this->data['afdispname']) ? $this->data['afdispname'] : null; |
| 41: | } |
| 42: | |
| 43: | public function getPreferredName() |
| 44: | { |
| 45: | return isset($this->data['preferred-name']['$']) ? $this->data['preferred-name']['$'] : null; |
| 46: | } |
| 47: | |
| 48: | public function getParentPreferredName() |
| 49: | { |
| 50: | return isset($this->data['parent-preferred-name']['$']) ? $this->data['parent-preferred-name']['$'] : null; |
| 51: | } |
| 52: | |
| 53: | public function getSortName() |
| 54: | { |
| 55: | return isset($this->data['sort-name']) ? $this->data['sort-name'] : null; |
| 56: | } |
| 57: | |
| 58: | public function getAddress() |
| 59: | { |
| 60: | return isset($this->data['address']['address-part']) ? $this->data['address']['address-part'] : null; |
| 61: | } |
| 62: | |
| 63: | public function getCity() |
| 64: | { |
| 65: | return isset($this->data['address']['city']) ? $this->data['address']['city'] : null; |
| 66: | } |
| 67: | |
| 68: | public function getCodeCity() |
| 69: | { |
| 70: | return isset($this->data['address']['state']) ? $this->data['address']['state'] : null; |
| 71: | } |
| 72: | |
| 73: | public function getCountry() |
| 74: | { |
| 75: | return isset($this->data['address']['country']) ? $this->data['address']['country'] : null; |
| 76: | } |
| 77: | |
| 78: | public function getPostalCode() |
| 79: | { |
| 80: | return isset($this->data['address']['postal-code']) ? $this->data['address']['postal-code'] : null; |
| 81: | } |
| 82: | |
| 83: | public function getGeneralName() |
| 84: | { |
| 85: | return $this->getDispName() . " - " . $this->getCity() . ", " . $this->getCountry(); |
| 86: | } |
| 87: | } |
| 88: | |