Squiz Matrix
4.12.2
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
All
Data Structures
Namespaces
Functions
Variables
Pages
DSN.inc
1
<?php
23
class
DSN
24
{
25
26
40
private
$_dsn;
41
47
private
$_failure = FALSE;
48
49
56
public
function
__construct
(Array $dsn)
57
{
58
$this->_dsn = $dsn;
59
60
}
//end constructor
61
62
69
public
function
getDSN
()
70
{
71
return
$this->_dsn;
72
73
}
//end getDSN()
74
75
82
public
function
getFailure
()
83
{
84
return
$this->_failure;
85
86
}
//end getFailure()
87
88
96
public
function
setFailure
($failure)
97
{
98
$this->_failure = $failure;
99
100
}
//end setFailure()
101
102
110
public
function
getWeight
()
111
{
112
$weight = array_get_index($this->_dsn,
'weight'
, 1);
113
if
(!is_numeric($weight) || ($weight < 1)) {
114
$weight = 1;
115
}
116
117
return
(
int
)$weight;
118
119
}
//end getWeight()
120
121
122
}
//end class
123
124
125
?>
squiz_matrix
core
lib
DAL
DSN.inc
Generated on Tue Jan 29 2013 14:04:50 for Squiz Matrix by
1.8.3.1