OldApi::setAccount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace Perry\Representation\OldApi\v1;
3
4
use Perry\Representation\Base;
5
use Perry\Representation\Reference;
6
use Perry\Setup;
7
8
class OldApi extends Base
9
{
10
    /**
11
     * @param array $ref
12
     */
13
    protected function setCharacter($ref)
14
    {
15
        $this->character = new Reference($ref, "net.3rdpartyeve.thora.Character-v1");
16
    }
17
18
    /**
19
     * @param array $account
20
     */
21
    public function setAccount($account)
22
    {
23
        $this->account = new Reference($account, "net.3rdpartyeve.thora.Account-v1");
24
    }
25
26
    /**
27
     * @param array $api
28
     */
29
    public function setApi($api)
30
    {
31
        $this->api = new Reference($api, "net.3rdpartyeve.thora.Api-v1");
32
    }
33
34
    /**
35
     * @param array $corporation
36
     */
37
    public function setCorporation($corporation)
38
    {
39
        $this->corporation = new Reference($corporation, "net.3rdpartyeve.thora.Corporation-v1");
40
    }
41
42
    /**
43
     * @param array $eve
44
     */
45
    public function setEve($eve)
46
    {
47
        $this->eve = new Reference($eve, "net.3rdpartyeve.thora.Eve-v1");
48
    }
49
50
    /**
51
     * @param array $map
52
     */
53
    public function setMap($map)
54
    {
55
        $this->map = new Reference($map, "net.3rdpartyeve.thora.Map-v1");
56
    }
57
58
    /**
59
     * @param array $server
60
     */
61
    public function setServer($server)
62
    {
63
        $this->server = new Reference($server, "net.3rdpartyeve.thora.Server-v1");
64
    }
65
66
    /**
67
     * @var Reference
68
     */
69
    public $account;
70
71
    /**
72
     * @var Reference
73
     */
74
    public $character;
75
76
    /**
77
     * @var Reference
78
     */
79
    public $corporation;
80
81
    /**
82
     * @var Reference
83
     */
84
    public $eve;
85
86
    /**
87
     * @var Reference
88
     */
89
    public $map;
90
91
    /**
92
     * @var Reference
93
     */
94
    public $server;
95
96
    /**
97
     * @var Reference
98
     */
99
    public $api;
100
101
    /**
102
     * @return OldApi
103
     */
104
    public static function getInstance()
105
    {
106
        return new OldApi(self::doGetRequest(Setup::$thoraUrl.'/', "net.3rdpartyeve.thora.OldApi-v1"));
107
    }
108
}
109