OrtcRequest::getOrtcConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ninjacto\OrtcPhp\Models\Requests;
4
5
use ninjacto\OrtcPhp\Configs\OrtcConfig;
6
use ninjacto\OrtcPhp\Handlers\OrtcResponseHandler;
7
8
abstract class OrtcRequest
9
{
10
    /**
11
     * @var OrtcConfig
12
     */
13
    private $ortcConfig;
14
15
    /**
16
     * get url path (not base url).
17
     *
18
     * @return string
19
     */
20
    abstract public function getUrlPath();
21
22
    /**
23
     * is post request or get request?
24
     *
25
     * @return bool
26
     */
27
    abstract public function isPost();
28
29
    /**
30
     * get post body.
31
     *
32
     * @return array
33
     */
34
    abstract public function getPostData();
35
36
    /**
37
     * get response handler.
38
     *
39
     * @return OrtcResponseHandler
40
     */
41
    abstract public function getResponseHandler();
42
43
    /**
44
     * @return OrtcConfig
45
     */
46 6
    public function getOrtcConfig()
47
    {
48 6
        return $this->ortcConfig;
49
    }
50
51
    /**
52
     * @param OrtcConfig $ortcConfig
53
     *
54
     * @return $this
55
     */
56 6
    public function setOrtcConfig($ortcConfig)
57
    {
58 6
        $this->ortcConfig = $ortcConfig;
59
60 6
        return $this;
61
    }
62
63
    /**
64
     * is absolute url?
65
     *
66
     * @return bool
67
     */
68 3
    public function isUrlAbsolute()
69
    {
70 3
        return false;
71
    }
72
}
73