(#3) - templating

This commit is contained in:
Martin Slachta
2026-06-14 07:16:13 +02:00
parent 37bced77f4
commit 7b3d9f0ece
32 changed files with 870 additions and 126 deletions
+18
View File
@@ -0,0 +1,18 @@
<?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;
}
}