for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Shared Kernel library.
*
* Copyright (c) 2016-present LIN3S <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LIN3S\SharedKernel\Infrastructure\Persistence\Sql;
final class Pdo
{
private $pdo;
public function __construct(\PDO $pdo)
$this->pdo = $pdo;
}
public function exec($statement)
return $this->pdo->exec($statement);
public function beginTransaction()
$this->pdo->beginTransaction();
public function commit()
$this->pdo->commit();
public function rollback()
$this->pdo->rollBack();
public function execute($sql, array $parameters)
$statement = $this->pdo->prepare($sql);
$statement->execute($parameters);
return $statement;