Files
Reservair/modules/Templating/RsvTemplateSymbols.php
Martin Slachta 7d7f748f7a (#3) - templating
2026-06-14 07:21:33 +02:00

19 lines
478 B
PHP

<?php
namespace Reservair\Templating;
/** Immutable symbol table passed to custom-element handlers. */
class RsvTemplateSymbols {
/** @param array<string, mixed> $data */
public function __construct(private readonly array $data) {}
/** @return array<string, mixed> */
public function all(): array {
return $this->data;
}
public function get(string $name, mixed $default = null): mixed {
return $this->data[$name] ?? $default;
}
}