src/Db/MySqlDb.php
public function pdo() {
        $dsnParts = array_translate($this->config, ['host', 'dbname', 'port']);
        $dsn = 'mysql:'.implode_assoc(';', '=', $dsnParts);

        if (!isset($this->pdo)) {
            $this->pdo = new PDO(
                $dsn,
                val('username', $this->config, ''),
                val('password', $this->config, ''),
                [
                    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
                    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
                    PDO::MYSQL_ATTR_INIT_COMMAND => 'set names utf8'
                ]
            );
        }
        return $this->pdo;
    }
public function pdo() {
        $dsnParts = array_translate($this->config, ['host', 'dbname', 'port']);
        $dsn = 'mysql:'.implode_assoc(';', '=', $dsnParts);

        if (!isset($this->pdo)) {
            $this->pdo = new PDO(
                $dsn,
                val('username', $this->config, ''),
                val('password', $this->config, ''),
                [
                    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
                    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
                    PDO::MYSQL_ATTR_INIT_COMMAND => 'set names utf8'
                ]
            );
        }
        return $this->pdo;
    }
Gets the {@link PDO} object for this connection.

@return \PDO