Completed
Push — master ( f02e0c...59b9e2 )
by Individual IT
13:32
created

HttpEvents   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEvent() 0 3 1
A getRequest() 0 3 1
1
<?php
2
/**
3
 * @author Semih Serhat Karakaya <[email protected]>
4
 *
5
 * @copyright Copyright (c) 2017, ownCloud GmbH
6
 * @license AGPL-3.0
7
 *
8
 * This code is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License, version 3,
10
 * as published by the Free Software Foundation.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License, version 3,
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
19
 *
20
 */
21
22
namespace OCP\Http;
23
24
use OCP\IRequest;
25
use Symfony\Component\EventDispatcher\Event;
26
27
/**
28
 * @since 10.0.3
29
 */
30
class HttpEvents extends Event {
31
	/** @var string */
32
	const EVENT_404 = 'resource.not_found';
33
34
	/** @var string */
35
	protected $event;
36
	/** @var IRequest */
37
	protected $request;
38
39
	/**
40
	 * @param string $event
41
	 * @param IRequest $request
42
	 * @since 10.0.3
43
	 */
44
	public function __construct($event, $request) {
45
		$this->event = $event;
46
		$this->request = $request;
47
	}
48
49
	/**
50
	 * @return string
51
	 * @since 10.0.3
52
	 */
53
	public function getEvent() {
54
		return $this->event;
55
	}
56
57
58
	/**
59
	 * @return IRequest
60
	 * @since 10.0.3
61
	 */
62
	public function getRequest() {
63
		return $this->request;
64
	}
65
}
66