DatabaseConnectionManager
in package
A class to manage database connections as true singletons across the application.
This class should not be used directly - always use DatabaseTrait::getDb() instead.
Table of Contents
Properties
Methods
- getConfig() : TiqConfig
- Gets the application configuration
- getInstance() : PgSQL
- Get the singleton database instance
- reset() : void
- For testing purposes - allows resetting the connection
- __construct() : mixed
- Private constructor to prevent instantiation
Properties
$config
private
static TiqConfig|null
$config
= null
- The configuration instance
$instance
private
static PgSQL|null
$instance
= null
- The single database instance for the application
Methods
getConfig()
Gets the application configuration
public
static getConfig() : TiqConfig
Return values
TiqConfiggetInstance()
Get the singleton database instance
public
static getInstance() : PgSQL
Return values
PgSQLreset()
For testing purposes - allows resetting the connection
public
static reset() : void
__construct()
Private constructor to prevent instantiation
private
__construct() : mixed