16 lines
378 B
PHP
16 lines
378 B
PHP
<?php
|
|
|
|
|
|
class RsvFormElementRegistry {
|
|
/** @var array<string, RsvFormElementHandler> */
|
|
public array $handlers = [];
|
|
|
|
public function register(string $type, RsvFormElementHandler $handler): void {
|
|
$this->handlers[$type] = $handler;
|
|
}
|
|
|
|
public function get(string $type): ?RsvFormElementHandler {
|
|
return $this->handlers[$type] ?? null;
|
|
}
|
|
}
|