GetResponseEvent::getResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the AMFWebServicesClientBundle package.
5
 *
6
 * (c) Amine Fattouch <http://github.com/fattouchsquall>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AMF\WebServicesClientBundle\Rest\Event;
13
14
use Symfony\Component\EventDispatcher\Event;
15
use AMF\WebServicesClientBundle\Rest\Component\Request;
16
use AMF\WebServicesClientBundle\Rest\Component\Response;
17
18
/**
19
 * The event for sharing request and response into listener.
20
 *
21
 * @author Mohamed Amine Fattouch <[email protected]>
22
 */
23
class GetResponseEvent extends Event
24
{
25
    /**
26
     * @var Request
27
     */
28
    protected $request;
29
30
    /**
31
     * @var Response
32
     */
33
    protected $response;
34
35
    /**
36
     * The constructor class.
37
     *
38
     * @param Request $request Instance of api request.
39
     */
40
    public function __construct(Request $request)
41
    {
42
        $this->request = $request;
43
    }
44
45
    /**
46
     * Getter for request.
47
     *
48
     * @return Request
49
     */
50
    public function getRequest()
51
    {
52
        return $this->request;
53
    }
54
55
    /**
56
     * Getter for response.
57
     *
58
     * @return Response
59
     */
60
    public function getResponse()
61
    {
62
        return $this->response;
63
    }
64
65
    /**
66
     * Setter for response.
67
     *
68
     * @param Response $response Instance of api response.
69
     */
70
    public function setResponse(Response $response)
71
    {
72
        $this->response = $response;
73
    }
74
}
75