TConnection
in package
Singleton manager for database connections
Tags
Table of Contents
Properties
- $config_path : mixed
- $conn_cache : mixed
Methods
- getDatabaseInfo() : mixed
- Returns the database information as an array
- open() : A
- Opens a database connection
- openArray() : A
- Opens a database connection from array with db info
- setConfigPath() : mixed
- Change database configuration Path
- setDatabaseInfo() : mixed
- Set database info
- __construct() : mixed
- Class Constructor There'll be no instances of this class
Properties
$config_path
private
static mixed
$config_path
$conn_cache
private
static mixed
$conn_cache
Methods
getDatabaseInfo()
Returns the database information as an array
public
static getDatabaseInfo(mixed $database) : mixed
Parameters
- $database : mixed
-
INI File
open()
Opens a database connection
public
static open(mixed $database) : A
Parameters
- $database : mixed
-
Name of the database (an INI file).
Tags
Return values
A —PDO object if the $database exist, otherwise, throws an exception
openArray()
Opens a database connection from array with db info
public
static openArray(mixed $db) : A
Parameters
- $db : mixed
-
Array with database info
Return values
A —PDO object
setConfigPath()
Change database configuration Path
public
static setConfigPath(mixed $path) : mixed
Parameters
- $path : mixed
-
Config path
setDatabaseInfo()
Set database info
public
static setDatabaseInfo(mixed $database, mixed $info) : mixed
Parameters
- $database : mixed
-
Database name
- $info : mixed
-
Database connection information
__construct()
Class Constructor There'll be no instances of this class
private
__construct() : mixed