Backup #437
| ID | 437 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/Infrastructure/Persistence/KiProtokollRepository.php |
| Version | 1 |
| Typ |
modified |
| Größe | 1016 B |
| Hash | 5caa016513dd5e2b13d1b1088ff32d4e6a5f82d4003a433a3d53e87867f17707 |
| Datum | 2025-12-22 10:11:58 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php
namespace Infrastructure\Persistence;
/**
* Repository für KI-Protokoll Datenbank (SRP)
*/
class KiProtokollRepository
{
private \PDO $pdo;
public function __construct()
{
$this->pdo = new \PDO(
'mysql:host=' . KI_DEV_DB_HOST . ';dbname=' . KI_DEV_DB_NAME . ';charset=utf8mb4',
KI_DEV_DB_USER,
KI_DEV_DB_PASS,
[
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
]
);
}
/**
* Letzte N Protokoll-Einträge abrufen
*/
public function findLatest(int $limit = 20): array
{
$stmt = $this->pdo->prepare(
'SELECT id, timestamp, client_name, request, status, duration_ms
FROM protokoll
ORDER BY id DESC
LIMIT :limit'
);
$stmt->bindValue(':limit', $limit, \PDO::PARAM_INT);
$stmt->execute();
return $stmt->fetchAll();
}
}
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 2116 |
8 |
modified |
7.0 KB |
2025-12-29 09:09 |
| 2097 |
7 |
modified |
4.6 KB |
2025-12-29 08:42 |
| 1263 |
6 |
modified |
4.5 KB |
2025-12-25 12:51 |
| 1194 |
5 |
modified |
4.5 KB |
2025-12-25 10:33 |
| 1177 |
4 |
modified |
4.6 KB |
2025-12-25 10:32 |
| 782 |
3 |
modified |
4.5 KB |
2025-12-23 08:05 |
| 447 |
2 |
modified |
778 B |
2025-12-22 10:19 |
| 437 |
1 |
modified |
1016 B |
2025-12-22 10:11 |
← Zurück zur Übersicht