SelectFailedException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 5
dl 0
loc 13
rs 9.8333
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 SelectFailedException extends QueryInterfaceException {
13
14
	/**
15
	 * @var string
16
	 */
17
	private $tableName;
18
19
	/**
20
	 * @var array
21
	 */
22
	private $fields;
23
24
	/**
25
	 * @var array
26
	 */
27
	private $conditions;
28
29
	/**
30
	 * @param string $tableName
31
	 * @param array $fields
32
	 * @param array $conditions
33
	 * @param string $message
34
	 * @param Exception $previous
35
	 */
36
	public function __construct(
37
		$tableName,
38
		array $fields,
39
		array $conditions,
40
		$message = '',
41
		Exception $previous = null
42
	) {
43
		parent::__construct( $message, 0, $previous );
44
45
		$this->tableName = $tableName;
46
		$this->fields = $fields;
47
		$this->conditions = $conditions;
48
	}
49
50
	/**
51
	 * @return string
52
	 */
53
	public function getTableName() {
54
		return $this->tableName;
55
	}
56
57
	/**
58
	 * @return array
59
	 */
60
	public function getFields() {
61
		return $this->fields;
62
	}
63
64
	/**
65
	 * @return array
66
	 */
67
	public function getConditions() {
68
		return $this->conditions;
69
	}
70
71
}
72