Neues Ladestationsmodul mit ocpp Modul erstellt.

This commit is contained in:
2026-05-10 10:56:34 +02:00
parent 51b27d568a
commit bba6494c59
27 changed files with 3290 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
class DataTransferRegistry
{
private bool $allowed;
private array $entries;
public function __construct(bool $allowed, array $entries = [])
{
$this->allowed = $allowed;
$this->entries = $entries;
}
public function isAllowed(string $vendorId, string $messageId = ''): bool
{
if (!$this->allowed) {
return false;
}
if (empty($this->entries)) {
return true;
}
foreach ($this->entries as $entry) {
if (($entry['vendorId'] ?? '') === $vendorId && (($entry['messageId'] ?? '') === '' || ($entry['messageId'] ?? '') === $messageId)) {
return true;
}
}
return false;
}
}
?>