PresenterResponseEvent::getPresenter()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of Symnedi.
5
 * Copyright (c) 2014 Tomas Votruba (http://tomasvotruba.cz)
6
 */
7
8
namespace Symnedi\EventDispatcher\Event;
9
10
use Nette\Application\IPresenter;
11
use Nette\Application\IResponse;
12
use Nette\Application\UI\Presenter;
13
use Symfony\Component\EventDispatcher\Event;
14
15
16
final class PresenterResponseEvent extends Event
17
{
18
19
	/**
20
	 * @var IPresenter|Presenter
21
	 */
22
	private $presenter;
23
24
	/**
25
	 * @var IResponse
26
	 */
27
	private $response;
28
29
30 6
	public function __construct(IPresenter $presenter, IResponse $response = NULL)
31
	{
32 6
		$this->presenter = $presenter;
33 6
		$this->response = $response;
34 6
	}
35
36
37
	/**
38
	 * @return Presenter
39
	 */
40 1
	public function getPresenter()
41
	{
42 1
		return $this->presenter;
43
	}
44
45
46
	/**
47
	 * @return IResponse
48
	 */
49 1
	public function getResponse()
50
	{
51 1
		return $this->response;
52
	}
53
54
}
55