File: DbalFactory.php Lines 6 to 20
6        return [
7            \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
8            \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
9            \PDO::ATTR_AUTOCOMMIT => false,
10
11            \PDO::ATTR_EMULATE_PREPARES => true,
12            \PDO::ATTR_CASE => \PDO::CASE_LOWER,
13        ];
14    }
Type Class Description
pmd ShortVariable Avoid variables with short names like $pw. Configured minimum length is 3.
15
Type Class Description
pmd ShortVariable Avoid variables with short names like $pw. Configured minimum length is 3.
    static public function mysql($host, $dbname, $user, $pw, $charset=null) {
16        $strDsn = sprintf('mysql:host=%s;dbname=%s;charset=%s', $host, $dbname, $charset);
17        $pdo = new \PDO($strDsn, $user, $pw, self::getPdoOptions());
18        return new Dbal($pdo);
19    }
20}