Overview

Namespaces

  • Scopus
    • Exception
    • Response
    • Util

Classes

  • Scopus\Response\AbstractAuthor
  • Scopus\Response\AbstractCoredata
  • Scopus\Response\AbstractItem
  • Scopus\Response\Abstracts
  • Scopus\Response\Affiliation
  • Scopus\Response\Author
  • Scopus\Response\AuthorGroup
  • Scopus\Response\AuthorName
  • Scopus\Response\AuthorProfile
  • Scopus\Response\BaseLinks
  • Scopus\Response\Bibrecord
  • Scopus\Response\BibrecordHead
  • Scopus\Response\Correspondence
  • Scopus\Response\CorrespondencePerson
  • Scopus\Response\Entry
  • Scopus\Response\EntryAuthor
  • Scopus\Response\EntryLinks
  • Scopus\Response\SearchLinks
  • Scopus\Response\SearchResults
  • Scopus\Response\Source
  • Scopus\ScopusApi
  • Scopus\SearchQuery
  • Scopus\Util\XmlUtil

Interfaces

  • Scopus\Response\IAbstract
  • Scopus\Response\IAuthor
  • Scopus\Response\IAuthorName

Exceptions

  • Scopus\Exception\JsonException
  • Scopus\Exception\XmlException
  • Overview
  • Namespace
  • Class
 1: <?php
 2: 
 3: namespace Scopus\Response;
 4: 
 5: class Affiliation
 6: {
 7:     /** @var array */
 8:     protected $data;
 9:     
10:     /** @var array */
11:     protected $nameVariants;
12:     
13:     public function __construct(array $data)
14:     {
15:         $this->data = $data;
16:     }
17:     
18:     public function getId()
19:     {
20:         return $this->data['afid'];
21:     }
22:     
23:     public function getUrl()
24:     {
25:         return isset($this->data['affiliation-url']) ? $this->data['affiliation-url'] : null;
26:     }
27:     
28:     public function getName()
29:     {
30:         return isset($this->data['affilname']) ? $this->data['affilname'] : null;
31:     }
32:     
33:     public function getCity()
34:     {
35:         return isset($this->data['affiliation-city']) ? $this->data['affiliation-city'] : null;
36:     }
37:     
38:     public function getCountry()
39:     {
40:         return isset($this->data['affiliation-country']) ? $this->data['affiliation-country'] : null;
41:     }
42:     
43:     public function getNameVariant()
44:     {
45:         if (isset($this->data['name-variant'])) {
46:             return $this->nameVariants ?: $this->nameVariants = array_map(function($nameVariant) {
47:                 return $nameVariant['$'];
48:             }, $this->data['name-variant']);
49:         }
50:     }
51: }
API documentation generated by ApiGen