mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-06 08:15:36 +08:00
20 lines
347 B
PHP
20 lines
347 B
PHP
<?php
|
|
|
|
|
|
namespace ZM\MySQL;
|
|
|
|
|
|
use Doctrine\DBAL\Connection;
|
|
use Doctrine\DBAL\DriverManager;
|
|
use Doctrine\DBAL\Exception;
|
|
|
|
class MySQLManager
|
|
{
|
|
/**
|
|
* @return Connection
|
|
* @throws Exception
|
|
*/
|
|
public static function getConnection() {
|
|
return DriverManager::getConnection(["driverClass" => MySQLDriver::class]);
|
|
}
|
|
} |