Backup #447
| ID | 447 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/Infrastructure/Persistence/KiProtokollRepository.php |
| Version | 2 |
| Typ |
modified |
| Größe | 778 B |
| Hash | d878521a5cd3480062eadb5a665e44fbdcd16871ee1bd0f8bd5b584d41a1f919 |
| Datum | 2025-12-22 10:19:05 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php
namespace Infrastructure\Persistence;
use Infrastructure\Config\DatabaseFactory;
/**
* Repository für KI-Protokoll Datenbank (SRP)
*/
class KiProtokollRepository
{
private \PDO $pdo;
public function __construct(?\PDO $pdo = null)
{
$this->pdo = $pdo ?? DatabaseFactory::dev();
}
/**
* 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