DeleteFailedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 4
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
namespace Wikibase\Database\Exception;
4
5
use Exception;
6
7
/**
8
 * @since 0.1
9
 * @licence GNU GPL v2+
10
 * @author Jeroen De Dauw < [email protected] >
11
 */
12
class DeleteFailedException extends QueryInterfaceException {
13
14
	/**
15
	 * @var string
16
	 */
17
	private $tableName;
18
19
	/**
20
	 * @var array
21
	 */
22
	private $conditions;
23
24
	/**
25
	 * @param string $tableName
26
	 * @param array $conditions
27
	 * @param string $message
28
	 * @param Exception $previous
29
	 */
30
	public function __construct(
31
		$tableName,
32
		array $conditions,
33
		$message = '',
34
		Exception $previous = null
35
	) {
36
		parent::__construct( $message, 0, $previous );
37
38
		$this->tableName = $tableName;
39
		$this->conditions = $conditions;
40
	}
41
42
	/**
43
	 * @return string
44
	 */
45
	public function getTableName() {
46
		return $this->tableName;
47
	}
48
49
	/**
50
	 * @return array
51
	 */
52
	public function getConditions() {
53
		return $this->conditions;
54
	}
55
56
}
57