$db
$db : array
Database connection(s)
Db class
connect(string $adapter, array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\AbstractAdapter
Method to connect to a database and return the database adapter object
string | $adapter | |
array | $options | |
string | $prefix |
mysqlConnect(array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\Mysql|\Pop\Db\Adapter\AbstractAdapter
Method to connect to a MySQL database and return the MySQL database adapter object
array | $options | |
string | $prefix |
pdoConnect(array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\Pdo|\Pop\Db\Adapter\AbstractAdapter
Method to connect to a PDO database and return the PDO database adapter object
array | $options | |
string | $prefix |
pgsqlConnect(array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\Pgsql|\Pop\Db\Adapter\AbstractAdapter
Method to connect to a PostgreSQL database and return the PostgreSQL database adapter object
array | $options | |
string | $prefix |
sqlsrvConnect(array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\Sqlsrv|\Pop\Db\Adapter\AbstractAdapter
Method to connect to a SQL Server database and return the SQL Server database adapter object
array | $options | |
string | $prefix |
sqliteConnect(array $options, string $prefix = '\Pop\Db\Adapter\\') : \Pop\Db\Adapter\Sqlite|\Pop\Db\Adapter\AbstractAdapter
Method to connect to a SQLite database and return the SQLite database adapter object
array | $options | |
string | $prefix |
setDb(\Pop\Db\Adapter\AbstractAdapter $db, string $class = null, string $prefix = null, boolean $isDefault = false) : void
Set DB adapter
\Pop\Db\Adapter\AbstractAdapter | $db | |
string | $class | |
string | $prefix | |
boolean | $isDefault |
getDb(string $class = null) : \Pop\Db\Adapter\AbstractAdapter
Get DB adapter
string | $class |
setDefaultDb(\Pop\Db\Adapter\AbstractAdapter $db, string $class = null, string $prefix = null) : void
Set DB adapter
\Pop\Db\Adapter\AbstractAdapter | $db | |
string | $class | |
string | $prefix |
db(string $class = null) : \Pop\Db\Adapter\AbstractAdapter
Get DB adapter (alias)
string | $class |