/** * Constructs a new connection * @param zibo\library\database\Dsn $dsn connection parameters * @return null */ public function __construct(Dsn $dsn) { if ($dsn->getProtocol() != self::PROTOCOL) { throw new SqliteException('Provided dsn does not have the sqlite protocol'); } parent::__construct($dsn); }
/** * Constructs a new connection * @param zibo\library\database\Dsn $dsn connection parameters * @return null */ public function __construct(Dsn $dsn) { if ($dsn->getProtocol() != self::PROTOCOL) { throw new MysqlException('Provided dsn does not have the mysql protocol'); } if (!function_exists('mysql_connect')) { throw new MysqlException('Could not create a MysqlDriver instance. Your PHP installation does not support MySQL, please install the MySQL extension.'); } parent::__construct($dsn); $this->isTransactionStarted = false; }