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 AuthorName implements IAuthorName
 6: {
 7:     /** @var array */
 8:     protected $data;
 9:     
10:     /** @var string */
11:     protected $ns;
12:     
13:     public function __construct(array $data, $ns = '')
14:     {
15:         $this->data = $data;
16:         $this->ns = $ns ? rtrim($ns, ':').':' : '';
17:     }
18: 
19:     public function getGivenName()
20:     {
21:         return isset($this->data[$this->ns.'given-name']) ? $this->data[$this->ns.'given-name'] : null;
22:     }
23: 
24:     public function getSurname()
25:     {
26:         return $this->data[$this->ns.'surname'];
27:     }
28: 
29:     public function getInitials()
30:     {
31:         return $this->data[$this->ns.'initials'];
32:     }
33:     
34:     public function getIndexedName()
35:     {
36:         return $this->data[$this->ns.'indexed-name'];
37:     }
38: }
API documentation generated by ApiGen