TemplateEvent   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 104
ccs 21
cts 21
cp 1
rs 10
c 0
b 0
f 0
wmc 9
lcom 0
cbo 1

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getSource() 0 4 1
A getParameters() 0 4 1
A __construct() 0 7 1
A getView() 0 4 1
A getResponse() 0 4 1
A setView() 0 4 1
A setSource() 0 4 1
A setParameters() 0 4 1
A setResponse() 0 4 1
1
<?php
2
/*
3
 * This file is part of EC-CUBE
4
 *
5
 * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
6
 *
7
 * http://www.lockon.co.jp/
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
 */
23
24
25
namespace Eccube\Event;
26
27
use Symfony\Component\EventDispatcher\Event;
28
use Symfony\Component\HttpFoundation\Response;
29
30
/**
31
 * Class TemplateEvent
32
 * @package Eccube\Event
33
 */
34
class TemplateEvent extends Event
35
{
36
37
    /**
38
     * @var string
39
     */
40
    private $view;
41
42
    /**
43
     * @var string
44
     */
45
    private $source;
46
47
    /**
48
     * @var array
49
     */
50
    private $parameters;
51
52
    /**
53
     * @var null|Response
54
     */
55
    private $response;
56
57
    /**
58
     * TemplateEvent constructor.
59
     *
60
     * @param string $view
0 ignored issues
show
introduced by
Expected 8 spaces after parameter type; 1 found
Loading history...
61
     * @param string $source
0 ignored issues
show
introduced by
Expected 8 spaces after parameter type; 1 found
Loading history...
62
     * @param array $parameters
0 ignored issues
show
introduced by
Expected 9 spaces after parameter type; 1 found
Loading history...
63
     * @param Response|null $response
64
     */
65 372
    public function __construct($view, $source, array $parameters = array(), Response $response = null)
66
    {
67 372
        $this->view = $view;
68 372
        $this->source = $source;
69 372
        $this->parameters = $parameters;
70 372
        $this->response = $response;
71
    }
72
73
    /**
74
     * @return string
75
     */
76 1
    public function getView()
77
    {
78 1
        return $this->view;
79
    }
80
81
    /**
82
     * @param string $view
83
     */
84 1
    public function setView($view)
85
    {
86 1
        $this->view = $view;
87
    }
88
89
    /**
90
     * @return string
91
     */
92 369
    public function getSource()
93
    {
94 369
        return $this->source;
95
    }
96
97
    /**
98
     * @param string $source
99
     */
100 1
    public function setSource($source)
101
    {
102 1
        $this->source = $source;
103
    }
104
105
    /**
106
     * @return array
107
     */
108 369
    public function getParameters()
109
    {
110 369
        return $this->parameters;
111
    }
112
113
    /**
114
     * @param array $parameters
115
     */
116 1
    public function setParameters($parameters)
117
    {
118 1
        $this->parameters = $parameters;
119
    }
120
121
    /**
122
     * @return null|Response
123
     */
124 1
    public function getResponse()
125
    {
126 1
        return $this->response;
127
    }
128
129
    /**
130
     * @param null|Response $response
131
     */
132 1
    public function setResponse($response)
133
    {
134 1
        $this->response = $response;
135
    }
136
137
}
138