Backup: old custom PHP API code removed from fahrschultermin.de
This commit is contained in:
28
backup/old_api_20260520/app/Repositories/BaseRepository.php
Normal file
28
backup/old_api_20260520/app/Repositories/BaseRepository.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Support\Database;
|
||||
use PDO;
|
||||
|
||||
abstract class BaseRepository
|
||||
{
|
||||
protected PDO $db;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = Database::connection();
|
||||
}
|
||||
|
||||
protected function lastInsertId(): string
|
||||
{
|
||||
return Database::lastInsertId();
|
||||
}
|
||||
|
||||
protected function now(): string
|
||||
{
|
||||
return gmdate('c');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user