1: <?php
2:
3: namespace Scopus\Response;
4:
5: abstract class BaseLinks
6: {
7: /** @var array */
8: protected $links;
9:
10: public function __construct(array $links)
11: {
12: $this->links = [];
13: foreach ($links as $link) {
14: $this->links[$link['@ref']] = $link['@href'];
15: }
16: }
17:
18: public function getSelf()
19: {
20: return $this->links['self'];
21: }
22: }