getData(); * // Generar HTML * return $html; * } * * public function supports(string $componentType): bool * { * return $componentType === 'my-component'; * } * } * ``` * * @package ROITheme\Domain\Component */ interface RendererInterface { /** * Renderizar un componente a HTML * * @param Component $component Componente a renderizar * @return string HTML generado */ public function render(Component $component): string; /** * Verificar si este renderizador soporta un tipo de componente * * @param string $componentType Tipo de componente (ej: 'navbar', 'footer') * @return bool True si soporta el tipo, false en caso contrario */ public function supports(string $componentType): bool; }