1: <?php
2:
3: namespace Scopus\Response;
4:
5: class Source
6: {
7:
8: protected $data;
9:
10: public function __construct(array $data)
11: {
12: $this->data = $data;
13: }
14:
15: public function getTitle()
16: {
17: return isset($this->data['sourcetitle']) ? $this->data['sourcetitle'] : null;
18: }
19:
20: public function getTitleAbbrev()
21: {
22: return isset($this->data['sourcetitle-abbrev']) ? $this->data['sourcetitle-abbrev'] : null;
23: }
24:
25: protected function getVolisspag()
26: {
27: return isset($this->data['volisspag']) ? $this->data['volisspag'] : null;
28: }
29:
30: protected function getPageRange()
31: {
32: $volisspag = $this->getVolisspag();
33: return $volisspag && isset($volisspag['pagerange']) ? $volisspag['pagerange'] : null;
34: }
35:
36: public function getStartPage()
37: {
38: $pageRange = $this->getPageRange();
39: return $pageRange && isset($pageRange['@first']) ? $pageRange['@first'] : null;
40: }
41:
42: public function getEndPage()
43: {
44: $pageRange = $this->getPageRange();
45: return $pageRange && isset($pageRange['@last']) ? $pageRange['@last'] : null;
46: }
47:
48: protected function getVoliss()
49: {
50: $volisspag = $this->getVolisspag();
51: return $volisspag && isset($volisspag['voliss']) ? $volisspag['voliss'] : null;
52: }
53:
54: public function getIssue()
55: {
56: $volIss = $this->getVoliss();
57: return $volIss && isset($volIss['@issue']) ? $volIss['@issue'] : null;
58: }
59:
60: public function getVolume()
61: {
62: $volIss = $this->getVoliss();
63: return $volIss && isset($volIss['@volume']) ? $volIss['@volume'] : null;
64: }
65: }