18 lines
508 B
PHP
18 lines
508 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Reservair\Templating;
|
||
|
|
|
||
|
|
/** A registered handler for a hyphenated custom element tag. */
|
||
|
|
interface RsvTemplateElement {
|
||
|
|
/** Renders the element to a trusted HTML string given the resolved symbol table. */
|
||
|
|
public function render(RsvTemplateSymbols $symbols): string;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Returns the symbol names this element understands — used by validation to
|
||
|
|
* report missing or extra attributes.
|
||
|
|
*
|
||
|
|
* @return list<string>
|
||
|
|
*/
|
||
|
|
public function symbols(): array;
|
||
|
|
}
|