date.chapril.org-framadate/app/classes/Framadate/Repositories/AbstractRepository.php
Thomas Citharel 3157d6a590 Run php-cs-fixer with a custom config. This may break a lot of things
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-02-19 19:43:30 +01:00

44 lines
814 B
PHP

<?php
namespace Framadate\Repositories;
use Framadate\FramaDB;
abstract class AbstractRepository {
/**
* @var FramaDB
*/
private $connect;
/**
* PollRepository constructor.
* @param FramaDB $connect
*/
function __construct(FramaDB $connect) {
$this->connect = $connect;
}
public function beginTransaction() {
$this->connect->beginTransaction();
}
public function commit() {
$this->connect->commit();
}
function rollback() {
$this->connect->rollback();
}
public function prepare($sql) {
return $this->connect->prepare($sql);
}
function query($sql) {
return $this->connect->query($sql);
}
function lastInsertId() {
return $this->connect->lastInsertId();
}
}