XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
database.php
Go to the documentation of this file.
1
<?php
21
defined(
'XOOPS_ROOT_PATH'
) or die('Restricted access');
22
26
if
(defined('
XOOPS_C_DATABASE_INCLUDED
')) {
27
return
;
28
}
29
30
define(
'XOOPS_C_DATABASE_INCLUDED'
, 1);
31
40
class
XoopsDatabase
41
{
47
var
$prefix
=
''
;
48
55
var
$logger
;
56
62
var
$allowWebChanges
=
false
;
63
69
function
XoopsDatabase
()
70
{
71
// exit('Cannot instantiate this class directly');
72
}
73
81
function
setLogger
(&
$logger
)
82
{
83
$this->logger = &
$logger
;
84
}
85
91
function
setPrefix
($value)
92
{
93
$this->
prefix
= $value;
94
}
95
104
function
prefix
($tablename =
''
)
105
{
106
if
($tablename !=
''
) {
107
return
$this->
prefix
.
'_'
. $tablename;
108
}
else
{
109
return
$this->prefix
;
110
}
111
}
112
}
113
119
class
Database
120
{
121
function
&
getInstance
()
122
{
123
if
(is_object(
$GLOBALS
[
'xoopsLogger'
])) {
124
$GLOBALS
[
'xoopsLogger'
]->addDeprecated(
"'Database::getInstance();' is deprecated since XOOPS 2.5.4, please use 'XoopsDatabaseFactory::getDatabaseConnection();' instead."
);
125
}
126
$inst =&
XoopsDatabaseFactory::getDatabaseConnection
();
127
return
$inst;
128
}
129
}
130
131
?>
L:
0xoops
xoops-2.5.6
htdocs
class
database
database.php
Generated on Fri May 10 2013 01:04:23 for XOOPS 2.5.6 by
1.8.3.1