Shieldon\Firewall\Driver\MysqlDriver
PDO
$pdo -
The PDO instance.bool
$debug false
Trun debug mode or not.self
You have to inject a PDO instance to Shieldon data driver.
$mysqlDriver = new \Shieldon\Firewall\Driver\MysqlDriver($pdoInstance);
Example:
$db = [
'host' => '127.0.0.1',
'dbname' => 'testdb',
'user' => 'root',
'pass' => 'sdfaa422kadhd3',
'charset' => 'utf8',
];
$pdoInstance = new \PDO(
'mysql:host=' . $db['host'] . ';dbname=' . $db['dbname'] . ';charset=' . $db['charset'],
$db['user'],
$db['pass']
);
$kernel->setDriver( new \Shieldon\Firewall\Driver\MysqlDriver($pdoInstance));
That's it.