XCL Web Application Platform
2.5.0
The XoopsCube Legacy Project
📘
Loading...
Searching...
No Matches
database.php
1
<?php
13
17
if
(!defined(
'XOOPS_C_DATABASE_INCLUDED'
)) {
18
define(
'XOOPS_C_DATABASE_INCLUDED'
, 1);
19
20
21
class
XoopsDatabase
22
{
27
public
$prefix =
''
;
28
34
public
$logger;
35
41
public
function
__construct()
42
{
43
// exit("Cannot instantiate this class directly");
44
}
45
52
public
function
setLogger(&$logger)
53
{
54
$this->logger =& $logger;
55
}
56
62
public
function
setPrefix($value)
63
{
64
$this->prefix = $value;
65
}
66
75
public
function
prefix($tablename=
''
)
76
{
77
if
(
''
!= $tablename) {
78
return
$this->prefix .
'_'
. $tablename;
79
}
else
{
80
return
$this->prefix;
81
}
82
}
83
}
84
}
85
86
92
class
Database
93
{
94
95
public
static
function
&getInstance()
96
{
97
$instance =&
XoopsDatabaseFactory::getDatabaseConnection
();
98
return
$instance;
99
}
100
}
Database
Definition
database.php:93
XoopsDatabaseFactory\getDatabaseConnection
static & getDatabaseConnection()
Definition
databasefactory.php:25
html
class
database
database.php
Generated by
1.13.2