Completed
Branch master (73f336)
by John
01:59
created

ParsedURL::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace LunixREST\Request\URLParser;
3
4
use LunixREST\Request\RequestData\RequestData;
5
6
class ParsedURL {
7
    /**
8
     * @var RequestData
9
     */
10
    protected $requestData;
11
    /**
12
     * @var string
13
     */
14
    protected $version;
15
    /**
16
     * @var string
17
     */
18
    protected $apiKey;
19
    /**
20
     * @var string
21
     */
22
    protected $endpoint;
23
    /**
24
     * @var string
25
     */
26
    protected $extension;
27
    /**
28
     * @var string
29
     */
30
    protected $instance;
31
32
    /**
33
     * ParsedURL constructor.
34
     * @param RequestData $requestData
35
     * @param string $version
36
     * @param string $apiKey
37
     * @param string $endpoint
38
     * @param string $extension
39
     * @param string $instance
40
     */
41
    public function __construct(RequestData $requestData, $version, $apiKey, $endpoint, $extension, $instance) {
42
        $this->requestData = $requestData;
43
        $this->version = $version;
44
        $this->apiKey = $apiKey;
45
        $this->endpoint = $endpoint;
46
        $this->extension = $extension;
47
        $this->instance = $instance;
48
    }
49
50
    /**
51
     * @return RequestData
52
     */
53
    public function getRequestData(): RequestData {
54
        return $this->requestData;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getVersion(): string {
61
        return $this->version;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getApiKey(): string {
68
        return $this->apiKey;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getEndpoint(): string {
75
        return $this->endpoint;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getExtension(): string {
82
        return $this->extension;
83
    }
84
85
    /**
86
     * @return string|null
87
     */
88
    public function getInstance() {
89
        return $this->instance;
90
    }
91
}
92