1 | <?php |
||
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 |
||
|
|||
61 | * @param string $source |
||
62 | * @param array $parameters |
||
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() |
|
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() |
|
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() |
|
128 | |||
129 | /** |
||
130 | * @param null|Response $response |
||
131 | */ |
||
132 | 1 | public function setResponse($response) |
|
136 | |||
137 | } |
||
138 |